Skip to content

Package the CuPy-based scipy tests - #3102

Open
antonwolfy wants to merge 3 commits into
masterfrom
fix-cupyx-tests-packaging
Open

antonwolfy wants to merge 3 commits into
masterfrom
fix-cupyx-tests-packaging

Conversation

@antonwolfy

Copy link
Copy Markdown
Contributor

The package_data glob tests/third_party/cupyx/*/*.py in setup.py reaches only cupyx/scipy_tests/__init__.py, not the test files one level below it. So scipy_tests/linalg_tests/test_decomp_lu.py, scipy_tests/sparse_tests/test_linalg.py and scipy_tests/special_tests/test_erf.py (with their __init__.py) were left out of the dpnp package. The released dpnp-0.20.0 wheel contains only cupyx/__init__.py and cupyx/scipy_tests/__init__.py.

As a result these tests never ran in jobs that test an installed package with --pyargs dpnp.tests, including the required conda Test jobs; they ran only in source-tree jobs (open-source LLVM SYCL build, coverage, oneMath). This PR adds the tests/third_party/cupyx/*/*/*.py glob, after which every tracked file under cupyx/ is covered.

Locally the three test files pass on both the OpenCL CPU and the Level Zero GPU device (1745 passed, 385 skipped). They have not run on Windows before, so the Windows Test jobs will be the first run there.

  • 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 tests/third_party/cupyx/*/*.py glob reaches only the scipy_tests
package itself, so the test files one level below it (linalg_tests,
sparse_tests, special_tests) were left out of the dpnp package and never
ran with --pyargs dpnp.tests against an installed package.
@antonwolfy antonwolfy self-assigned this Oct 14, 2026
@antonwolfy antonwolfy added this to the 0.21.0 release milestone Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/3102/index.html

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev14=np2py314h8d9cdd5_7 ran successfully.
Passed: 1376
Failed: 0
Skipped: 6

@coveralls

coveralls commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

No base build to compare — fix-cupyx-tests-packaging into master

At the test's density diag(a) is mostly zero, so 1/diag(a) put inf into
the Jacobi preconditioner. SciPy and dpnp then both returned NaN, the
comparison passed as NaN == NaN, and the reference side raised
RuntimeWarnings. Use 1 for the zero diagonal entries so both sides
compare finite results.
Without it the installed dpnp.tests.third_party was an implicit
namespace package, unlike in the source tree.

This branch has not been deployed

No deployments
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