Skip to content

Fix local testing - #3228

Merged
leofang merged 1 commit into
NVIDIA:mainfrom
mdboom:fix-local-testing
Oct 27, 2026
Merged

leofang merged 1 commit into
NVIDIA:mainfrom
mdboom:fix-local-testing

Conversation

@mdboom

@mdboom mdboom commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

0271e3a broke local cuda_core testing.

To reproduce:

python -m pip install ./cuda_bindings_13
python -m pip install ./cuda_core
python -m pytest cuda_core/tests

Pytest resolves those filterwarnings entries while loading config, which is before cuda_core/tests/conftest.py runs. At that point it imports helpers, and pythonpath = tests makes that importable.
The conftest's sys.path fallback for cuda_python_test_helpers hasn't run yet. From the repo root, cuda_python_test_helpers resolves to the empty namespace directory.
helpers/init.py does from cuda_python_test_helpers import *, which binds nothing and raises nothing. So helpers finishes importing and stays cached in sys.modules without IS_WINDOWS, IS_WSL or libc.
helpers.memory then fails to import. That failure is the "Failed to import filter module" warning the pytest.ini comment says it ignores. The cached helpers package stays, and the conftest bootstrap never evicts it.
Every later from helpers... import IS_WINDOWS then fails.

Avoiding import * is the simplest way to fix this.

@mdboom mdboom self-assigned this Oct 26, 2026
@mdboom mdboom added bug Something isn't working cuda.bindings Everything related to the cuda.bindings module BLOCKING CI labels Oct 26, 2026
@mdboom mdboom added this to the cuda.bindings 13.5.0 & 12.9.10 milestone Oct 26, 2026
@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Oct 26, 2026
@mdboom
mdboom requested a review from juenglin October 26, 2026 20:10
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fd5f89d and 04f87e9.

Files selected for processing: 1
  • cuda_core/tests/helpers/__init__.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Made a minor internal maintenance change. There are no user-visible changes or changes to application behavior.

The test helpers package replaces a wildcard import with explicit imports of five names from cuda_python_test_helpers.

Changes: Test helper imports

Layer / File(s) Summary
Explicit helper imports
cuda_core/tests/helpers/__init__.py
The initializer explicitly imports IS_LINUX, IS_WINDOWS, IS_WSL, libc, and under_compute_sanitizer.

Possibly related issues

Possibly related PRs

Suggested labels: cuda.core, test

Suggested reviewers: cpcloud

Priority: Normal

Change: Bug fix

Merge Risk: Minimal · up to 04f87

No merge-blocking risk was identified in this focused test-helper import change.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

@github-actions

github-actions Bot commented Oct 26, 2026 •

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

@juenglin juenglin 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.

Thank you.

@leofang

leofang commented Oct 26, 2026

Copy link
Copy Markdown
Member

CI failed due to #3038. I re-ran it.

@leofang
leofang merged commit b4a5e55 into NVIDIA:main Oct 27, 2026
327 of 333 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 27, 2026
Removed preview folders for the following PRs:
- PR #3226
- PR #3228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLOCKING CI bug Something isn't working cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants