Skip to content

Conversation

vlad-perevezentsev
Copy link
Contributor

This PR suggests extending dpnp.linalg.lu_solve() #2575 for batch arrays and adding new lapack getrs_batch extension

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Array API standard conformance tests for dpnp=0.20.0dev0=py313h509198e_24 ran successfully.
Passed: 1227
Failed: 0
Skipped: 9

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 71.831% (-0.2%) from 72.015%
when pulling 38689a3 on impl_lu_solve_batch
into a4edd9b on master.

Copy link
Contributor

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) {
Copy link
Contributor

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

Suggested change
if (!is_ipiv_array_c_contig && !is_ipiv_array_f_contig) {
if (!is_ipiv_array_c_contig || !is_ipiv_array_f_contig) {

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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");
    }

Copy link
Contributor Author

@vlad-perevezentsev vlad-perevezentsev Oct 10, 2025

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants