Skip to content

test(cuda.bindings): cover sm_90a, sm_103 and sm_103a in the nvJitLink and nvFatbin tests - #3218

Open
0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:test/nvjitlink-nvfatbin-sm90a-sm103
Open

0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:test/nvjitlink-nvfatbin-sm90a-sm103

Conversation

@0z5a

@0z5a 0z5a commented Oct 24, 2026

Copy link
Copy Markdown

Description

closes #3217

The architecture lists in the four nvJitLink / nvFatbin test files stop at sm_100 and contain no arch-specific target:

  • tests/test_nvjitlink.py
  • tests/test_nvfatbin.py
  • tests/legacy_api/test_legacy_nvjitlink.py
  • tests/legacy_api/test_legacy_nvfatbin.py

So nothing exercises the a targets, or sm_103 (B300 / GB300). That is where nvJitLink stopped serving sm_103 from sm_100 code, which is why #2296 moved the RDC fixture to -arch=all.

This PR adds sm_90a, sm_103 and sm_103a:

  • nvJitLink tests: the PTX versions are paired with the architectures (zip), so the new entries use each target's minimum PTX ISA version: 8.0 for sm_90a, and 8.8 for sm_103 / sm_103a.
  • nvFatbin tests: the PTX version is an independent parameter, crossed with every architecture, and nvFatbin only packages the PTX. So their version list is unchanged.

The tests were written with Claude Opus 5.5 and reviewed by the contributor. The PR changes only existing parametrize lists and adds no test function.

Testing

Host Before After
B300 186 passed 282 passed, 0 failed
GH200 186 passed 282 passed, 0 failed

Both counts cover the four files, run with nvcc on PATH so that the nvFatbin object fixtures run.

These tests compile and link, but never launch anything. To check that the new a targets also load, a separate script (not part of this PR) produced sm_103a images on the B300 and sm_90a images on the GH200:

  • nvJitLink: linked the PTX into a cubin.
  • NVRTC: compiled a cubin.
  • nvFatbin: packed the cubin into a fatbin.

It loaded each image with cuModuleLoadData, ran a kernel from it and checked the result. All three passed on both machines.

GPU: B300 (cc 10.3, x86_64) | driver 610.57.04 | CUDA 13.4.2 (local CTK, nvJitLink / nvFatbin 13.4) | Python 3.12 | cuda-python 2da9c65a
GPU: GH200 (cc 9.0, aarch64) | driver 595.58.03 | CUDA 13.4.2 (local CTK) | Python 3.12 | cuda-python 2da9c65a

The runs used 2da9c65a; the branch is rebased onto current main, whose two new commits do not touch these test files.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes (no documentation is affected).

…k and nvFatbin tests

The four architecture lists stopped at sm_100 and had no arch-specific target, so
nothing exercised the "a" targets or sm_103 (B300 / GB300), where nvJitLink no longer
serves sm_103 from sm_100 code (the reason the RDC fixture moved to -arch=all in NVIDIA#2296).

Add sm_90a, sm_103 and sm_103a. In the nvJitLink tests the PTX versions pair with the
architectures, so the new entries use each target's minimum PTX ISA version: 8.0 for
sm_90a and 8.8 for sm_103 / sm_103a. The nvFatbin tests take the PTX version as an
independent parameter, so their version list is unchanged.

Tests written with Claude Opus 5.5 and reviewed by the contributor.

Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
@copy-pr-bot

copy-pr-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.bindings Everything related to the cuda.bindings module label Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Tests
    • Expanded CUDA fatbin and JIT linking test coverage to include sm_90a, sm_103, and sm_103a architectures.
    • Added corresponding PTX version combinations to JIT linking tests, helping validate behavior across a broader range of target architectures.

The nvFatbin and nvJitLink test parameter lists now include sm_90a, sm_103, and sm_103a. The nvJitLink lists pair those targets with PTX versions 8.0, 8.8, and 8.8, respectively.

Changes: Architecture test coverage

Layer / File(s) Summary
nvFatbin architecture parameters
cuda_bindings_13/tests/test_nvfatbin.py, cuda_bindings_13/tests/legacy_api/test_legacy_nvfatbin.py
The parameter lists add sm_90a, sm_103, and sm_103a.
nvJitLink architecture and PTX pairs
cuda_bindings_13/tests/test_nvjitlink.py, cuda_bindings_13/tests/legacy_api/test_legacy_nvjitlink.py
The parameter lists add sm_90a/8.0, sm_103/8.8, and sm_103a/8.8 pairs.

Assessment against linked issues

Objective Addressed Explanation
Add sm_90a, sm_103, and sm_103a to the nvFatbin and nvJitLink test lists, with the requested nvJitLink PTX versions [#3217] ✅

Suggested labels: test, cuda.bindings

Suggested reviewers: rwgk

Priority: Low

Change: Other

Merge Risk: Low · up to 250e5

The new architecture cases should be removed from the legacy suites or the repository exception should be explicitly accepted before merging.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a2fb804 and 250e500.

Files selected for processing: 4
  • cuda_bindings_13/tests/legacy_api/test_legacy_nvfatbin.py
  • cuda_bindings_13/tests/legacy_api/test_legacy_nvjitlink.py
  • cuda_bindings_13/tests/test_nvfatbin.py
  • cuda_bindings_13/tests/test_nvjitlink.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.

from cuda.bindings import nvfatbin, nvrtc

ARCHITECTURES = ["sm_75", "sm_80", "sm_90", "sm_100"]
ARCHITECTURES = ["sm_75", "sm_80", "sm_90", "sm_90a", "sm_100", "sm_103", "sm_103a"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Maintainability & Code Quality · Quick win

important: Do not add new architecture cases to this legacy test list. The tests/legacy_api rule permits updates only when needed to fix test failures. This change adds sm_90a, sm_103, and sm_103a for coverage. Keep these additions in the canonical tests/test_nvfatbin.py list unless a specific legacy failure requires them.

Source: Coding guidelines

Comment on lines +23 to +24
ARCHITECTURES = ["sm_75", "sm_80", "sm_90", "sm_90a", "sm_100", "sm_103", "sm_103a"]
PTX_VERSIONS = ["6.4", "7.0", "8.5", "8.0", "8.8", "8.8", "8.8"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Maintainability & Code Quality · Quick win

important: Keep new architecture coverage out of the legacy suite.

These entries add test coverage; they do not fix a reported legacy test failure. Keep the new cases in cuda_bindings_13/tests/test_nvjitlink.py. Revert the additions here unless they fix a specific failing legacy test. As per coding guidelines: “These test files should not be added to, only updated when necessary to fix test failures.”

Source: Coding guidelines

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

cuda.bindings Everything related to the cuda.bindings module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA]: Test nvJitLink and nvFatbin against sm_90a, sm_103 and sm_103a

1 participant