Repository navigation
test(cuda.core): gate the NVRTC option tests on the cuda-bindings version - #3335
Conversation
…sion test_cpp_program_with_various_options checks that cuda.core encodes each ProgramOptions field as a flag that NVRTC accepts. An older NVRTC rejects flags that it predates, so the test failed with NVRTC 12.6 or 12.8 for no_cache, frandom_seed, and ofast_compile, which first appear in 12.9. Run the test only when the NVRTC major.minor is at least the cuda-bindings major.minor. The gate moves with cuda-bindings releases and needs no per-option version table. It makes the per-option PCH gates (12.8) redundant, so remove them. Closes NVIDIA#3333. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Findings
|
| Layer / File(s) | Summary |
|---|---|
Gate option tests by NVRTC version cuda_core/tests/test_program.py |
The parameterized test uses the cuda-bindings major/minor version as its NVRTC threshold. Individual PCH parameter skips were removed. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
Skip NVRTC option cases when the installed NVRTC version is below the required version [#3333] |
✅ | |
Avoid failures from torch CUDA Array Interface v2 samples [#3333] |
❌ | The PR does not change the CUDA Array Interface tests or their handling of v2 samples. |
Possibly related issues
- Issue 2722: The PR changes the version conditions for the program-option test, but does not address the broader CI coverage objective.
- Issue 2077: The PR changes the version conditions for the program-option test, but does not address the broader test coverage objective.
Suggested reviewers: leofang
Change: Other · Severity of issue fixed: Low
Merge Risk: 
Low · up to 69ea3
-
Some supported NVRTC options lose test coverage in mixed-version environments. Narrowing the skips would retain that coverage.
| ProgramOptions(instantiate_templates_in_pch=True), | ||
| ], | ||
| ) | ||
| @nvrtc_at_bindings_version |
There was a problem hiding this comment.
important: Gate only unsupported option cases.
With cuda-bindings 13.4 and NVRTC 13.3, this skips every parameter, including ftz, which NVRTC 13.3 supports. (docs.nvidia.com) This removes option coverage from supported mixed-version environments. Apply version gates to the affected parameters instead.
As per path instructions: “skip only for genuine setup or feature-unavailable conditions.”
Source: Path instructions
|
Summary
test_cpp_program_with_various_optionschecks that cuda.core encodes eachProgramOptionsfield as a flag that NVRTC accepts. With an older NVRTC 12.x (for example 12.6, which torch cu126 pins), the test fails forno_cache,frandom_seed, andofast_compile, because these flags first appear in NVRTC 12.9. This change runs the test only when the NVRTC major.minor is at least the major.minor of the installed cuda-bindings, and skips it on an older NVRTC. The gate moves with cuda-bindings releases, so it needs no per-option version table.Changes
cuda_core/tests/test_program.py: add thenvrtc_at_bindings_versionmarker and apply it totest_cpp_program_with_various_options.cuda_core/tests/test_program.py: remove the four per-option PCH gates (NVRTC >= 12.8) in that test; the new gate covers them. Thenumba_debuggate (13.2) and thedevice_float128architecture gate stay.CI lanes whose toolkit matches the cuda-bindings build version (12.9.x and 13.4.x) still run the test; lanes with an older toolkit now skip it.
Related Work
Closes #3333. Item 2 of that issue (torch CAI v2) was fixed by #3033.
🤖 Generated with Claude Code