MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / gemmDispatch

Function gemmDispatch

src/backend/oneapi/blas.cpp:68–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template<typename T>
68static void gemmDispatch(sycl::queue queue, oneapi::mkl::transpose lOpts,
69 oneapi::mkl::transpose rOpts, int M, int N, int K,
70 const T *alpha, const arrayfire::oneapi::Array<T> &lhs,
71 dim_t lStride, const arrayfire::oneapi::Array<T> &rhs,
72 dim_t rStride, const T *beta,
73 arrayfire::oneapi::Array<T> &out, dim_t oleading) {
74 using Dt = arrayfire::oneapi::data_t<T>;
75 const af::dim4 lStrides = lhs.strides();
76
77 const af::dim4 rStrides = rhs.strides();
78 const af::dim4 oStrides = out.strides();
79 sycl::buffer<Dt, 1> lhsBuf = lhs.template getBufferWithOffset<Dt>();
80 sycl::buffer<Dt, 1> rhsBuf = rhs.template getBufferWithOffset<Dt>();
81 sycl::buffer<Dt, 1> outBuf = out.template getBufferWithOffset<Dt>();
82 ::oneapi::mkl::blas::gemm(queue, lOpts, rOpts, M, N, K, *alpha, lhsBuf,
83 lStride, rhsBuf, rStride, *beta, outBuf,
84 oleading);
85}
86
87namespace arrayfire {
88namespace oneapi {

Callers

nothing calls this directly

Calls 2

gemmFunction · 0.70
stridesMethod · 0.45

Tested by

no test coverage detected