15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 25 #ifdef EGBLAS_HAS_SBIAS_BATCH_SUM 26 static constexpr
bool has_sbias_batch_sum =
true;
28 static constexpr
bool has_sbias_batch_sum =
false;
41 [[maybe_unused]]
size_t n,
42 [[maybe_unused]]
float* A,
43 [[maybe_unused]]
size_t lda,
44 [[maybe_unused]]
float* B,
45 [[maybe_unused]]
size_t ldb) {
46 #ifdef EGBLAS_HAS_SBIAS_BATCH_SUM 48 egblas_sbias_batch_sum(b, n, A, lda, B, ldb);
50 cpp_unreachable(
"Invalid call to egblas::bias_batch_sum");
54 #ifdef EGBLAS_HAS_DBIAS_BATCH_SUM 55 static constexpr
bool has_dbias_batch_sum =
true;
57 static constexpr
bool has_dbias_batch_sum =
false;
70 [[maybe_unused]]
size_t n,
71 [[maybe_unused]]
double* A,
72 [[maybe_unused]]
size_t lda,
73 [[maybe_unused]]
double* B,
74 [[maybe_unused]]
size_t ldb) {
75 #ifdef EGBLAS_HAS_DBIAS_BATCH_SUM 77 egblas_dbias_batch_sum(b, n, A, lda, B, ldb);
79 cpp_unreachable(
"Invalid call to egblas::bias_batch_sum");
83 #ifdef EGBLAS_HAS_SBIAS_BATCH_MEAN 84 static constexpr
bool has_sbias_batch_mean =
true;
86 static constexpr
bool has_sbias_batch_mean =
false;
99 [[maybe_unused]]
size_t n,
100 [[maybe_unused]]
float* A,
101 [[maybe_unused]]
size_t lda,
102 [[maybe_unused]]
float* B,
103 [[maybe_unused]]
size_t ldb) {
104 #ifdef EGBLAS_HAS_SBIAS_BATCH_MEAN 106 egblas_sbias_batch_mean(b, n, A, lda, B, ldb);
108 cpp_unreachable(
"Invalid call to egblas::bias_batch_mean");
112 #ifdef EGBLAS_HAS_DBIAS_BATCH_MEAN 113 static constexpr
bool has_dbias_batch_mean =
true;
115 static constexpr
bool has_dbias_batch_mean =
false;
128 [[maybe_unused]]
size_t n,
129 [[maybe_unused]]
double* A,
130 [[maybe_unused]]
size_t lda,
131 [[maybe_unused]]
double* B,
132 [[maybe_unused]]
size_t ldb) {
133 #ifdef EGBLAS_HAS_DBIAS_BATCH_MEAN 135 egblas_dbias_batch_mean(b, n, A, lda, B, ldb);
137 cpp_unreachable(
"Invalid call to egblas::bias_batch_mean");
141 #ifdef EGBLAS_HAS_SBIAS_BATCH_VAR 142 static constexpr
bool has_sbias_batch_var =
true;
144 static constexpr
bool has_sbias_batch_var =
false;
157 [[maybe_unused]]
size_t n,
158 [[maybe_unused]]
float* A,
159 [[maybe_unused]]
size_t lda,
160 [[maybe_unused]]
float* B,
161 [[maybe_unused]]
size_t ldb,
162 [[maybe_unused]]
float* Y,
163 [[maybe_unused]]
size_t ldy) {
164 #ifdef EGBLAS_HAS_SBIAS_BATCH_VAR 166 egblas_sbias_batch_var(b, n, A, lda, B, ldb, Y, ldy);
168 cpp_unreachable(
"Invalid call to egblas::bias_batch_var");
172 #ifdef EGBLAS_HAS_DBIAS_BATCH_VAR 173 static constexpr
bool has_dbias_batch_var =
true;
175 static constexpr
bool has_dbias_batch_var =
false;
188 [[maybe_unused]]
size_t n,
189 [[maybe_unused]]
double* A,
190 [[maybe_unused]]
size_t lda,
191 [[maybe_unused]]
double* B,
192 [[maybe_unused]]
size_t ldb,
193 [[maybe_unused]]
double* Y,
194 [[maybe_unused]]
size_t ldy) {
195 #ifdef EGBLAS_HAS_DBIAS_BATCH_VAR 197 egblas_dbias_batch_var(b, n, A, lda, B, ldb, Y, ldy);
199 cpp_unreachable(
"Invalid call to egblas::bias_batch_var");
203 #ifdef EGBLAS_HAS_SBIAS_BATCH_SUM4 204 static constexpr
bool has_sbias_batch_sum4 =
true;
206 static constexpr
bool has_sbias_batch_sum4 =
false;
219 [[maybe_unused]]
size_t n,
220 [[maybe_unused]]
size_t w,
221 [[maybe_unused]]
size_t h,
222 [[maybe_unused]]
float* A,
223 [[maybe_unused]]
float* B) {
224 #ifdef EGBLAS_HAS_SBIAS_BATCH_SUM4 226 egblas_sbias_batch_sum4(b, n, w, h, A, B);
228 cpp_unreachable(
"Invalid call to egblas::bias_batch_sum");
232 #ifdef EGBLAS_HAS_SBIAS_BATCH_MEAN4 233 static constexpr
bool has_sbias_batch_mean4 =
true;
235 static constexpr
bool has_sbias_batch_mean4 =
false;
248 [[maybe_unused]]
size_t n,
249 [[maybe_unused]]
size_t w,
250 [[maybe_unused]]
size_t h,
251 [[maybe_unused]]
float* A,
252 [[maybe_unused]]
float* B) {
253 #ifdef EGBLAS_HAS_SBIAS_BATCH_MEAN4 255 egblas_sbias_batch_mean4(b, n, w, h, A, B);
257 cpp_unreachable(
"Invalid call to egblas::bias_batch_mean");
261 #ifdef EGBLAS_HAS_DBIAS_BATCH_SUM4 262 static constexpr
bool has_dbias_batch_sum4 =
true;
264 static constexpr
bool has_dbias_batch_sum4 =
false;
277 [[maybe_unused]]
size_t n,
278 [[maybe_unused]]
size_t w,
279 [[maybe_unused]]
size_t h,
280 [[maybe_unused]]
double* A,
281 [[maybe_unused]]
double* B) {
282 #ifdef EGBLAS_HAS_DBIAS_BATCH_SUM4 284 egblas_dbias_batch_sum4(b, n, w, h, A, B);
286 cpp_unreachable(
"Invalid call to egblas::bias_batch_sum");
290 #ifdef EGBLAS_HAS_DBIAS_BATCH_MEAN4 291 static constexpr
bool has_dbias_batch_mean4 =
true;
293 static constexpr
bool has_dbias_batch_mean4 =
false;
306 [[maybe_unused]]
size_t n,
307 [[maybe_unused]]
size_t w,
308 [[maybe_unused]]
size_t h,
309 [[maybe_unused]]
double* A,
310 [[maybe_unused]]
double* B) {
311 #ifdef EGBLAS_HAS_DBIAS_BATCH_MEAN4 313 egblas_dbias_batch_mean4(b, n, w, h, A, B);
315 cpp_unreachable(
"Invalid call to egblas::bias_batch_mean");
319 #ifdef EGBLAS_HAS_SBIAS_BATCH_VAR4 320 static constexpr
bool has_sbias_batch_var4 =
true;
322 static constexpr
bool has_sbias_batch_var4 =
false;
335 [[maybe_unused]]
size_t n,
336 [[maybe_unused]]
size_t w,
337 [[maybe_unused]]
size_t h,
338 [[maybe_unused]]
float* A,
339 [[maybe_unused]]
float* B,
340 [[maybe_unused]]
float* Y) {
341 #ifdef EGBLAS_HAS_SBIAS_BATCH_VAR4 343 egblas_sbias_batch_var4(b, n, w, h, A, B, Y);
345 cpp_unreachable(
"Invalid call to egblas::bias_batch_var");
349 #ifdef EGBLAS_HAS_DBIAS_BATCH_VAR4 350 static constexpr
bool has_dbias_batch_var4 =
true;
352 static constexpr
bool has_dbias_batch_var4 =
false;
365 [[maybe_unused]]
size_t n,
366 [[maybe_unused]]
size_t w,
367 [[maybe_unused]]
size_t h,
368 [[maybe_unused]]
double* A,
369 [[maybe_unused]]
double* B,
370 [[maybe_unused]]
double* Y) {
371 #ifdef EGBLAS_HAS_DBIAS_BATCH_VAR4 373 egblas_dbias_batch_var4(b, n, w, h, A, B, Y);
375 cpp_unreachable(
"Invalid call to egblas::bias_batch_var");
void bias_batch_sum4([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] size_t w, [[maybe_unused]] size_t h, [[maybe_unused]] float *A, [[maybe_unused]] float *B)
Wrappers for single-precision egblas bias_batch_sum operation.
Definition: bias_batch_sum.hpp:218
void bias_batch_mean4([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] size_t w, [[maybe_unused]] size_t h, [[maybe_unused]] float *A, [[maybe_unused]] float *B)
Wrappers for single-precision egblas bias_batch_mean operation.
Definition: bias_batch_sum.hpp:247
void bias_batch_var([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] float *A, [[maybe_unused]] size_t lda, [[maybe_unused]] float *B, [[maybe_unused]] size_t ldb, [[maybe_unused]] float *Y, [[maybe_unused]] size_t ldy)
Wrappers for single-precision egblas bias_batch_var operation.
Definition: bias_batch_sum.hpp:156
void bias_batch_var4([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] size_t w, [[maybe_unused]] size_t h, [[maybe_unused]] float *A, [[maybe_unused]] float *B, [[maybe_unused]] float *Y)
Wrappers for single-precision egblas bias_batch_var operation.
Definition: bias_batch_sum.hpp:334
void bias_batch_mean([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] float *A, [[maybe_unused]] size_t lda, [[maybe_unused]] float *B, [[maybe_unused]] size_t ldb)
Wrappers for single-precision egblas bias_batch_mean operation.
Definition: bias_batch_sum.hpp:98
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25
void bias_batch_sum([[maybe_unused]] size_t b, [[maybe_unused]] size_t n, [[maybe_unused]] float *A, [[maybe_unused]] size_t lda, [[maybe_unused]] float *B, [[maybe_unused]] size_t ldb)
Wrappers for single-precision egblas bias_batch_sum operation.
Definition: bias_batch_sum.hpp:40