8 #include <sycl/sycl.hpp>
14 #include "oneapi/mkl.hpp"
26 using namespace oneapi::mkl;
28 int nrhs = k, lda = m, stride_a = lda * n, ldb = std::max(m, n),
29 stride_b = ldb * nrhs, batch_size = 1;
32 int64_t scratchpad_size = lapack::gels_batch_scratchpad_size<scalar_t>(
33 queue, transpose::N, m, n, nrhs, lda, stride_a, ldb, stride_b,
35 core::Blob scratchpad(scratchpad_size *
sizeof(scalar_t), device);
37 queue, transpose::N, m, n, nrhs,
static_cast<scalar_t*
>(A_data),
38 lda, stride_a,
static_cast<scalar_t*
>(B_data), ldb, stride_b,
39 batch_size,
static_cast<scalar_t*
>(scratchpad.
GetDataPtr()),
#define DISPATCH_LINALG_DTYPE_TO_TEMPLATE(DTYPE,...)
static SYCLContext & GetInstance()
Get singleton instance.
sycl::queue GetDefaultQueue(const Device &device)
Get the default SYCL queue given an CloudViewer device.
void LeastSquaresSYCL(void *A_data, void *B_data, int64_t m, int64_t n, int64_t k, Dtype dtype, const Device &device)
Generic file read and write utility for python interface.