Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/blas/backends/cublas/cublas_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ inline void gemm_batch_impl(sycl::queue& queue, transpose transa, transpose tran

GEMM_STRIDED_BATCH_LAUNCHER(sycl::half, sycl::half, sycl::half, sycl::half)
GEMM_STRIDED_BATCH_LAUNCHER(sycl::half, sycl::half, float, float)
GEMM_STRIDED_BATCH_LAUNCHER(std::int8_t, std::int8_t, float, float)
GEMM_STRIDED_BATCH_LAUNCHER(float, float, float, float)
GEMM_STRIDED_BATCH_LAUNCHER(double, double, double, double)
GEMM_STRIDED_BATCH_LAUNCHER(std::complex<float>, std::complex<float>, std::complex<float>,
Expand All @@ -208,6 +209,8 @@ GEMM_STRIDED_BATCH_LAUNCHER(std::complex<double>, std::complex<double>, std::com

#undef GEMM_STRIDED_BATCH_LAUNCHER

// cuBLAS computes an int32 output only with CUBLAS_COMPUTE_32I, which requires int32 alpha and
// beta, whereas oneMath specifies float scalars for this combination.
#define GEMM_STRIDED_BATCH_LAUNCHER(TYPE_A, TYPE_B, TYPE_C, TYPE_S) \
void gemm_batch(sycl::queue& queue, transpose transa, transpose transb, int64_t m, int64_t n, \
int64_t k, TYPE_S alpha, sycl::buffer<TYPE_A, 1>& a, int64_t lda, \
Expand All @@ -220,7 +223,6 @@ GEMM_STRIDED_BATCH_LAUNCHER(std::complex<double>, std::complex<double>, std::com
dtype_string<TYPE_C>() + "," + dtype_string<TYPE_S>() + ">"); \
}

GEMM_STRIDED_BATCH_LAUNCHER(std::int8_t, std::int8_t, float, float)
GEMM_STRIDED_BATCH_LAUNCHER(std::int8_t, std::int8_t, std::int32_t, float)

#undef GEMM_STRIDED_BATCH_LAUNCHER
Expand Down Expand Up @@ -668,6 +670,7 @@ inline sycl::event gemm_batch_strided_usm_impl(sycl::queue& queue, transpose tra

GEMM_STRIDED_BATCH_LAUNCHER_USM(sycl::half, sycl::half, sycl::half, sycl::half)
GEMM_STRIDED_BATCH_LAUNCHER_USM(sycl::half, sycl::half, float, float)
GEMM_STRIDED_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, float, float)
GEMM_STRIDED_BATCH_LAUNCHER_USM(float, float, float, float)
GEMM_STRIDED_BATCH_LAUNCHER_USM(double, double, double, double)
GEMM_STRIDED_BATCH_LAUNCHER_USM(std::complex<float>, std::complex<float>, std::complex<float>,
Expand All @@ -689,7 +692,6 @@ GEMM_STRIDED_BATCH_LAUNCHER_USM(std::complex<double>, std::complex<double>, std:
dtype_string<TYPE_C>() + "," + dtype_string<TYPE_S>() + ">"); \
}

GEMM_STRIDED_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, float, float)
GEMM_STRIDED_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, std::int32_t, float)

#undef GEMM_STRIDED_BATCH_LAUNCHER_USM
Expand Down Expand Up @@ -761,6 +763,7 @@ inline sycl::event gemm_batch_usm_impl(sycl::queue& queue, transpose* transa, tr

GEMM_BATCH_LAUNCHER_USM(sycl::half, sycl::half, sycl::half, sycl::half)
GEMM_BATCH_LAUNCHER_USM(sycl::half, sycl::half, float, float)
GEMM_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, float, float)
GEMM_BATCH_LAUNCHER_USM(float, float, float, float)
GEMM_BATCH_LAUNCHER_USM(double, double, double, double)
GEMM_BATCH_LAUNCHER_USM(std::complex<float>, std::complex<float>, std::complex<float>,
Expand All @@ -782,7 +785,6 @@ GEMM_BATCH_LAUNCHER_USM(std::complex<double>, std::complex<double>, std::complex
dtype_string<TYPE_C>() + "," + dtype_string<TYPE_S>() + ">"); \
}

GEMM_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, float, float)
GEMM_BATCH_LAUNCHER_USM(std::int8_t, std::int8_t, std::int32_t, float)

#undef GEMM_BATCH_LAUNCHER_USM
Expand Down
Loading
Loading