| 66 | |
| 67 | template<typename T> |
| 68 | static 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 | |
| 87 | namespace arrayfire { |
| 88 | namespace oneapi { |