Skip to content
Closed
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
14 changes: 7 additions & 7 deletions dpnp/backend/mkl_wrap_blas1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void mkl_blas_dot_c(void* array1_in, void* array2_in, void* result1, size_t size

try
{
status = mkl::blas::dot(DPNP_QUEUE,
size,
array_1,
1, // array_1 stride
array_2,
1, // array_2 stride
result);
status = oneapi::mkl::blas::dot(DPNP_QUEUE,
size,
array_1,
1, // array_1 stride
array_2,
1, // array_2 stride
result);
}
catch (cl::sycl::exception const& e)
{
Expand Down
28 changes: 14 additions & 14 deletions dpnp/backend/mkl_wrap_blas3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ void dpnp_blas_gemm_c(void* array1_in, void* array2_in, void* result1, size_t si
#endif
try
{
status = mkl::blas::gemm(DPNP_QUEUE,
mkl::transpose::nontrans,
mkl::transpose::nontrans,
size_n,
size_m,
size_k,
_DataType(1),
array_2,
ldb,
array_1,
lda,
_DataType(0),
result,
ldc);
status = oneapi::mkl::blas::gemm(DPNP_QUEUE,
oneapi::mkl::transpose::nontrans,
oneapi::mkl::transpose::nontrans,
size_n,
size_m,
size_k,
_DataType(1),
array_2,
ldb,
array_1,
lda,
_DataType(0),
result,
ldc);
}
catch (cl::sycl::exception const& e)
{
Expand Down
24 changes: 12 additions & 12 deletions dpnp/backend/mkl_wrap_lapack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ void mkl_lapack_syevd_c(void* array_in, void* result1, size_t size)

auto queue = DPNP_QUEUE;

const std::int64_t scratchpad_size =
mkl::lapack::syevd_scratchpad_size<_DataType>(queue, mkl::job::vec, mkl::uplo::upper, size, lda);
const std::int64_t scratchpad_size = oneapi::mkl::lapack::syevd_scratchpad_size<_DataType>(
queue, oneapi::mkl::job::vec, oneapi::mkl::uplo::upper, size, lda);
// const std::int64_t scratchpad_size = 7; // size = 2 & novec & lower
// const std::int64_t scratchpad_size = 34; // size = 2 & vec & upper

Expand All @@ -63,17 +63,17 @@ void mkl_lapack_syevd_c(void* array_in, void* result1, size_t size)
try
{
queue.wait_and_throw();
status = mkl::lapack::syevd(queue, // queue
mkl::job::vec, // jobz
mkl::uplo::upper, // uplo
size, // The order of the matrix A (0≤n)
array, // will be overwritten with eigenvectors
lda,
result,
scratchpad,
scratchpad_size);
status = oneapi::mkl::lapack::syevd(queue, // queue
oneapi::mkl::job::vec, // jobz
oneapi::mkl::uplo::upper, // uplo
size, // The order of the matrix A (0≤n)
array, // will be overwritten with eigenvectors
lda,
result,
scratchpad,
scratchpad_size);
}
catch (mkl::lapack::exception const& e)
catch (oneapi::mkl::lapack::exception const& e)
{
// Handle LAPACK related exceptions happened during asynchronous call
std::cout << "Unexpected exception caught during asynchronous LAPACK operation:\n"
Expand Down
18 changes: 9 additions & 9 deletions dpnp/backend/mkl_wrap_rng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ void mkl_rng_gaussian(void* result, size_t size)
// choose engine as is in numpy
// seed number
size_t seed = std::time(nullptr);
mkl::rng::philox4x32x10 engine(DPNP_QUEUE, seed);
oneapi::mkl::rng::philox4x32x10 engine(DPNP_QUEUE, seed);

const _DataType mean = _DataType(0.0);
const _DataType stddev = _DataType(1.0);

mkl::rng::gaussian<_DataType> distribution(mean, stddev);
oneapi::mkl::rng::gaussian<_DataType> distribution(mean, stddev);
try
{
// perform generation
mkl::rng::generate(distribution, engine, size, result1);
oneapi::mkl::rng::generate(distribution, engine, size, result1);
DPNP_QUEUE.wait_and_throw();
}
catch (cl::sycl::exception const& e)
Expand All @@ -70,16 +70,16 @@ void mkl_rng_uniform(void* result, size_t size)
// choose engine as is in numpy
// seed number
size_t seed = std::time(nullptr);
mkl::rng::philox4x32x10 engine(DPNP_QUEUE, seed);
oneapi::mkl::rng::philox4x32x10 engine(DPNP_QUEUE, seed);

const _DataType a = (_DataType(0.0));
const _DataType b = (_DataType(1.0));

mkl::rng::uniform<_DataType> distribution(a, b);
oneapi::mkl::rng::uniform<_DataType> distribution(a, b);
try
{
// perform generation
mkl::rng::generate(distribution, engine, size, result1);
oneapi::mkl::rng::generate(distribution, engine, size, result1);
DPNP_QUEUE.wait_and_throw();
}
catch (cl::sycl::exception const& e)
Expand All @@ -98,18 +98,18 @@ void mkl_rng_uniform_mt19937(void* result, long low, long high, size_t size)
// choose engine as is in numpy
// seed number
size_t seed = std::time(nullptr);
mkl::rng::mt19937 engine(DPNP_QUEUE, seed);
oneapi::mkl::rng::mt19937 engine(DPNP_QUEUE, seed);

// set left bound of distribution
const _DataType a = (_DataType(low));
// set right bound of distribution
const _DataType b = (_DataType(high));

mkl::rng::uniform<_DataType> distribution(a, b);
oneapi::mkl::rng::uniform<_DataType> distribution(a, b);
try
{
// perform generation
mkl::rng::generate(distribution, engine, size, result1);
oneapi::mkl::rng::generate(distribution, engine, size, result1);
DPNP_QUEUE.wait_and_throw();
}
catch (cl::sycl::exception const& e)
Expand Down