Add w/a for oneMath to fix test oneMKL interfaces action#2360
Add w/a for oneMath to fix test oneMKL interfaces action#2360vlad-perevezentsev merged 5 commits intomasterfrom
Conversation
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
|
Array API standard conformance tests for dpnp=0.18.0dev0=py312he4f9c94_32 ran successfully. |
| sycl_free_noexcept(scratchpad, exec_q); | ||
| if (ipiv != nullptr) | ||
| sycl_free_noexcept(ipiv, exec_q); | ||
| throw LinAlgError("The input coefficient matrix is singular."); |
There was a problem hiding this comment.
I'm curious why is it handled in another way comparing to oneapi::mkl::lapack::computation_error above?
There was a problem hiding this comment.
Above we handle all exceptions in oneapi::mkl::lapack::exception class by defining a specific exception using the value of info() method.
In this case if the input matrix is singular, the exception oneapi::mkl::computation_error is thrown.
Also info method is not available in oneapi::mkl::exception: class
There was a problem hiding this comment.
I see, the main reason is that we can't use gesv_utils::handle_lapack_exc here, because oneapi::mkl::computation_error doesn't expose info() method.
antonwolfy
left a comment
There was a problem hiding this comment.
Thank you @vlad-perevezentsev for investigating the issue with oneMath tests scope and implementing the workaround.
This PR suggests adding a temporary workaround to a problem in oneMath [#642 ](uxlfoundation/oneMath#642) where exceptions are no longer thrown in `lapack` namespace for `getrf` function as expected. In oneMath develop branch `oneapi::mkl::lapack::computation_error` is not thrown. Instead, `oneapi::mkl::computation_error` from `mkl` namespace is used so existing catch block `mkl_lapack::exception` does not handle singular matrix errors. A workaround has been added to explicitly catch `oneapi::mkl::computation_error` and update `dev_info` ensuring that singular matrices are handled correctly. 1b0ce60
This PR suggests adding a temporary workaround to a problem in oneMath #642 where exceptions are no longer thrown in
lapacknamespace forgetrffunction as expected.In oneMath develop branch
oneapi::mkl::lapack::computation_erroris not thrown.Instead,
oneapi::mkl::computation_errorfrommklnamespace is used so existing catch blockmkl_lapack::exceptiondoes not handle singular matrix errors.A workaround has been added to explicitly catch
oneapi::mkl::computation_errorand updatedev_infoensuring that singular matrices are handled correctly.