Skip to content

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Oct 6, 2025

This PR backports of #2608 from development branch to maintenance/0.19.x.

  • 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?

The PR reworks the import of `linalg` submodule to avoid a wildcard
import.

Also it resolves the issue reported by pylint:
> Cyclic import (dpnp.linalg -> dpnp.linalg.dpnp_iface_linalg ->
dpnp.linalg.dpnp_utils_linalg) (cyclic-import)

and moves `LinAlgError` exception to be exposed by LAPACK pybind11
extension, because it is created there.
While later the exception patched at python level to be set to
"dpnp.linalg" submodule explicitly.

Otherwise we have the import cycle like:
> linalg/__init__.py -> dpnp_iface_linalg.py -> dpnp_utils_linalg.py ->
linalg/__init__.py

which might cause the import failure.
@antonwolfy antonwolfy added this to the 0.19.0 release milestone Oct 6, 2025
@antonwolfy antonwolfy self-assigned this Oct 6, 2025
@antonwolfy antonwolfy merged commit d8b95d6 into maintenance/0.19.x Oct 6, 2025
53 of 67 checks passed
@antonwolfy antonwolfy deleted the backport-gh-2608 branch October 6, 2025 17:54
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.

2 participants