Skip to content

Fix #2377: Reorganize the test helpers (where appropriate) to cuda_python_test_helpers - #2384

Merged
mdboom merged 8 commits into
NVIDIA:mainfrom
mdboom:test-helpers
Aug 4, 2026
Merged

Fix #2377: Reorganize the test helpers (where appropriate) to cuda_python_test_helpers#2384
mdboom merged 8 commits into
NVIDIA:mainfrom
mdboom:test-helpers

Conversation

@mdboom

@mdboommdboom commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This moves test helpers that are generically useful across the subprojects to cuda_python_test_helpers. It fixes some corner cases in the sys.path hack to import cuda_python_test_helpers. It doesn't install it as a proper package -- I had hoped that would be possible, but upstream pip does not support path dependencies in a dependency group. Using that would require pip to be improved or require everyone to use uv.

@copy-pr-bot

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actionsgithub-actionsBot added CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Jul 17, 2026
@mdboom

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@mdboom

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@github-actions

This comment has been minimized.

@mdboom

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@mdboom

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@github-actionsgithub-actionsBot added the cuda.pathfinder Everything related to the cuda.pathfinder module label Jul 17, 2026
@mdboommdboom added the test Improvements or additions to tests label Jul 20, 2026
@mdboommdboom self-assigned this Jul 20, 2026
@mdboom
mdboom marked this pull request as ready for review July 20, 2026 13:12
@mdboommdboom changed the title Experiment: Install test_helpers as a packageFix #2377: Reorganize the test helpers (where appropriate) to cuda_python_test_helpersJul 20, 2026
@mdboom
mdboom requested a review from leofangJuly 20, 2026 13:17
@mdboommdboom added the PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. label Jul 20, 2026

@juenglinjuenglin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mdboommdboom added this to the cuda.bindings next milestone Aug 3, 2026
@mdboom
mdboom enabled auto-merge (squash) August 3, 2026 20:15
@mdboom
mdboom merged commit 19e6649 into NVIDIA:mainAug 4, 2026
208 of 211 checks passed
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

@rwgk

rwgk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

My codex thinks this failure

https://github.com/NVIDIA/cuda-python/actions/runs/30987658226/job/92246084554?pr=2509

is due to this PR. See below. Is this already on your radar?

• Confirmed: this is unrelated to PR 2509 and is deterministic, not a flake.
- The job passes all 1,276 Pathfinder tests, then fails on the first bindings import with ModuleNotFoundError: No module named 'cuda'.
- Pixi never builds cuda-bindings, so PR 2509’s modified build hooks are never executed.
- The same failure already occurred in PR 2384, which was merged as 19e66499c2.
- PR 2384 changed both pixi.toml files without updating their lockfiles. With Pixi 0.73, the first automatic lock refresh produces an
environment missing the local cuda-bindings and cuda-pathfinder packages.
- I reproduced the exact failure from a clean checkout using the CI’s Pixi 0.73. A second invocation in the same checkout converges and
succeeds, but rerunning GitHub Actions starts fresh and repeats the first-pass failure.
- The new TOML table placement also appears to unintentionally move several existing test dependencies from Conda to PyPI.
I recommend fixing this separately from PR 2509:
1. Keep the existing test dependencies under [feature.test.dependencies].
2. Put only cuda-python-test-helpers under [feature.test.pypi-dependencies], assuming that dependency is intentional.
3. Regenerate both cuda_bindings/pixi.lock and cuda_core/pixi.lock with Pixi 0.73 until they are stable and pixi lock --check passes from
a clean checkout.
4. Exercise both source-build/import commands.
The same stale-lock problem exists in cuda_core, so fixing only the bindings lock would likely expose the core failure next. Optional
hardening would be to make CI use locked mode so future manifest/lock mismatches fail explicitly instead of silently rewriting the lock.

@juenglin

Copy link
Copy Markdown
Contributor

@rwgk - Fix here: #2532

juenglin added a commit that referenced this pull request Aug 10, 2026
#2384 inserted a pypi-dependencies header mid-table, moving conda test
deps to PyPI without updating lockfiles. Fresh CI installs then dropped
the local cuda-bindings/cuda-core source packages, causing ModuleNotFoundError.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CDCI/CD infrastructurecuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core modulecuda.pathfinderEverything related to the cuda.pathfinder modulePR review get-togetherMark PRs you'd like the team to review at the weekly PR review get-together.testImprovements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mdboom@rwgk@juenglin@rparolin