Skip to content

Commit 890290c

Browse files
Describe numpy/MKL issues as comment in dpnp_eig_c (#1006)
Co-authored-by: Alexander-Makaryev <[email protected]>
1 parent f78f691 commit 890290c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpnp/backend/kernels/dpnp_krnl_common.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,15 @@ void dpnp_eig_c(const void* array_in, void* result1, void* result2, size_t size)
401401
const std::int64_t scratchpad_size = mkl_lapack::syevd_scratchpad_size<double>(
402402
DPNP_QUEUE, oneapi::mkl::job::vec, oneapi::mkl::uplo::upper, size, lda);
403403

404+
// https://github.com/IntelPython/dpnp/issues/1005
405+
// Test tests/test_linalg.py::test_eig_arange raises 2 issues in dpnp_eig_c on CPU
406+
// 1. Call of mkl_lapack::syevd_scratchpad_size<double> returns wrong value that causes out of memory issue.
407+
// 2. Call of the function oneapi::mkl::lapack::syevd causes segfault.
408+
// Example of the command to reproduce the issues:
409+
// SYCL_DEVICE_FILTER=cpu pytest tests/test_linalg.py::test_eig_arange[2-float64]
410+
// High-level reason of the issues is numpy is imported before dpnp in third party tests.
411+
// Low-level reason of the issues could be related to MKL runtime library loaded during numpy import.
412+
404413
double* scratchpad = reinterpret_cast<double*>(dpnp_memory_alloc_c(scratchpad_size * sizeof(double)));
405414

406415
event = mkl_lapack::syevd(DPNP_QUEUE, // queue

0 commit comments

Comments
 (0)