-
Notifications
You must be signed in to change notification settings - Fork 23
Implement dpnp.linalg.lu_solve()
batch inputs
#2619
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
base: master
Are you sure you want to change the base?
Conversation
Array API standard conformance tests for dpnp=0.20.0dev0=py313h509198e_24 ran successfully. |
View rendered docs @ https://intelpython.github.io/dpnp/pull/2619/index.html |
throw py::value_error("The right-hand sides array " | ||
"must be F-contiguous"); | ||
} | ||
if (!is_ipiv_array_c_contig && !is_ipiv_array_f_contig) { |
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.
If it must be both C- and F-contiguous
if (!is_ipiv_array_c_contig && !is_ipiv_array_f_contig) { | |
if (!is_ipiv_array_c_contig || !is_ipiv_array_f_contig) { |
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.
We should only get an error if the array is neither C-contig or F-contig
Using ||
will result in an error if either flag is false
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.
But in getrs implementation used &&
, it must be aligned somewhere.
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.
&&
is used in getrs
and in getrs_batch
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.
no, in getrs:
if (!is_ipiv_array_c_contig || !is_ipiv_array_f_contig) {
throw py::value_error("The array of pivot indices "
"must be contiguous");
}
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.
My bad
Fixed it in getrs
Thank you!
This PR suggests extending
dpnp.linalg.lu_solve()
#2575 for batch arrays and adding new lapackgetrs_batch
extension