-
Notifications
You must be signed in to change notification settings - Fork 23
Implement of dpnp.linalg.cholesky() #1638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View rendered docs @ https://intelpython.github.io/dpnp/pull//index.html |
dpnp/linalg/dpnp_utils_linalg.py
Outdated
| ht_lapack_ev.wait() | ||
| a_ht_copy_ev.wait() | ||
|
|
||
| a_h = dpnp.tril(a_h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to create a copy here? can we control the required decomposition by upper_lower flag and to avoid the extra copying?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need to get lower or upper triangular matrix with zeros above or below the main diagonal.
Since potrf and potrf_batch writes the result to the input array, we need to get rid of the input array data that has not changed.
antonwolfy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you @vlad-perevezentsev
This PR updates
dpnp.linalg.cholesky()function to calculate the Cholesky factorization usingoneapi::mkl::lapack::potrfandoneapi::mkl::lapack::potrf_batchThe implementation is written as a pybind11 extension above required LAPACK functions.