Skip to content

[None][infra] Recognize SM107 (Rubin) in build config and arch detection - #17336

Merged
zhangcl merged 3 commits into
NVIDIA:mainfrom
zhangcl:rubin/pr1-sm107-arch-enablement
Aug 10, 2026
Merged

[None][infra] Recognize SM107 (Rubin) in build config and arch detection#17336
zhangcl merged 3 commits into
NVIDIA:mainfrom
zhangcl:rubin/pr1-sm107-arch-enablement

Conversation

@zhangcl

@zhangcl zhangcl commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Enable SM107 (Rubin, compute capability 10.7) as a recognized architecture in the build system.

  • cuda_configuration.cmake: add 107 to the default architecture list, the compatibility base, and the list of architectures with kernels. Map 107 to the SM100 family (100f) so Rubin reuses SM100-family kernels.
  • cudaUtils.h / _utils.py: extend the SM100-family predicate to cover the 10.x range, and let isSM100Family() accept an explicit SM version.
  • conftest.py: add skip_no_rubin / skip_pre_rubin test markers.

Dev Engineer Review

  • Added SM107 support to CUDA configuration for CUDA 13.4 and newer.
  • Mapped SM107 to the SM100 (100f) kernel family.
  • Extended SM100-family detection to SM100–SM109.
  • Added optional explicit SM-version support to isSM100Family.
  • Added skip_no_rubin and skip_pre_rubin markers.
  • No test-list files were changed.
  • CI failures require review, fixes, and a rerun by an NVIDIA team member.

QA Engineer Review

  • Updated tests/integration/defs/conftest.py.
  • Added Rubin architecture detection and skip markers.
  • No test functions were added, modified, or removed.
  • No test-db/ or qa/ test-list changes were provided.
  • Verdict: needs follow-up because test-list coverage data is unavailable.

Description

Test Coverage

No new test functions were added: this PR adds architecture recognition only,
and the new path (SM107) cannot execute without Rubin hardware. Existing
coverage was used to verify the change is a no-op on Blackwell.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fb676124-7a64-4249-a28a-bc68f267be8c

📥 Commits

Reviewing files that changed from the base of the PR and between 1cef02e and 383b9ca.

📒 Files selected for processing (4)
  • cpp/cmake/modules/cuda_configuration.cmake
  • cpp/include/tensorrt_llm/common/cudaUtils.h
  • tensorrt_llm/_utils.py
  • tests/integration/defs/conftest.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • cpp/include/tensorrt_llm/common/cudaUtils.h
  • tensorrt_llm/_utils.py
  • tests/integration/defs/conftest.py

Walkthrough

The change adds CUDA architecture 107 support, classifies SM100 through SM109 as one family, and adds integration-test markers for Rubin architecture boundaries.

Changes

SM107 support

Layer / File(s) Summary
SM107 CUDA configuration
cpp/cmake/modules/cuda_configuration.cmake
CUDA 13.4+ enables architecture 107. Documentation and kernel exclusion handling include SM107.
SM100-family detection
cpp/include/tensorrt_llm/common/cudaUtils.h, tensorrt_llm/_utils.py
C++ and Python checks classify SM versions 100 through 109. The C++ helper accepts an optional SM version.
Rubin integration markers
tests/integration/defs/conftest.py
Integration detection recognizes SM100 through SM109 and adds markers for Rubin-only and pre-Rubin tests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: schetlur-nv, yuanjingx87, mikeiovine

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding SM107 recognition to infrastructure and architecture detection.
Description check ✅ Passed The description includes the required overview, test coverage, and checklist sections with relevant details about the SM107 changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/integration/defs/conftest.py (1)

1588-1588: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add boundary tests for is_sm_100f.

  • Added, modified, or removed test functions: none.
  • Affected existing tests are listed in the CI and QA files.
  • skip_no_rubin and skip_pre_rubin have no consumers.
  • Coverage verdict: insufficient. Add tests for SM99, SM100, SM107, SM109, and SM110. No test-list changes are required for the unused Rubin markers.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/defs/conftest.py` at line 1588, Update the tests covering
is_sm_100f to exercise the boundary and representative cases SM99, SM100, SM107,
SM109, and SM110, verifying only SM100 through SM109 are accepted. Do not modify
test lists for the unused skip_no_rubin or skip_pre_rubin markers.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/include/tensorrt_llm/common/cudaUtils.h`:
- Around line 309-312: Update isSM100Family so getSMVersion() is evaluated only
when the optional sm argument is absent, preserving the explicit-version path
without any CUDA query. Keep the existing SM100-family range check unchanged.

---

Nitpick comments:
In `@tests/integration/defs/conftest.py`:
- Line 1588: Update the tests covering is_sm_100f to exercise the boundary and
representative cases SM99, SM100, SM107, SM109, and SM110, verifying only SM100
through SM109 are accepted. Do not modify test lists for the unused
skip_no_rubin or skip_pre_rubin markers.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ead0271e-1c2d-4f67-84c8-b181a0cbe797

📥 Commits

Reviewing files that changed from the base of the PR and between b775e80 and dfce987.

📒 Files selected for processing (4)
  • cpp/cmake/modules/cuda_configuration.cmake
  • cpp/include/tensorrt_llm/common/cudaUtils.h
  • tensorrt_llm/_utils.py
  • tests/integration/defs/conftest.py

Comment thread cpp/include/tensorrt_llm/common/cudaUtils.h
@yifeizhang-c
yifeizhang-c self-requested a review August 6, 2026 03:39
@zhangcl

zhangcl commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64234 [ run ] triggered by Bot. Commit: 820efa6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64234 [ run ] completed with state SUCCESS. Commit: 820efa6
/LLM/main/L0_MergeRequest_PR pipeline #52140 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl

zhangcl commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64361 [ run ] triggered by Bot. Commit: 820efa6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64361 [ run ] completed with state FAILURE. Commit: 820efa6
/LLM/main/L0_MergeRequest_PR pipeline #52255 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl
zhangcl force-pushed the rubin/pr1-sm107-arch-enablement branch from 820efa6 to c05e989 Compare August 7, 2026 04:50
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@zhangcl

zhangcl commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@zhangcl

zhangcl commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64511 [ run ] triggered by Bot. Commit: c05e989 Link to invocation

Comment thread cpp/cmake/modules/cuda_configuration.cmake Outdated
Comment thread cpp/cmake/modules/cuda_configuration.cmake Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64511 [ run ] completed with state FAILURE. Commit: c05e989
/LLM/main/L0_MergeRequest_PR pipeline #52379 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl
zhangcl force-pushed the rubin/pr1-sm107-arch-enablement branch from 73b8b0d to d489ac2 Compare August 7, 2026 15:27
@zhangcl

zhangcl commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@zhangcl
zhangcl requested a review from tongyuantongyu August 7, 2026 15:35
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64631 [ run ] triggered by Bot. Commit: d489ac2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64631 [ run ] completed with state SUCCESS. Commit: d489ac2
/LLM/main/L0_MergeRequest_PR pipeline #52490 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl

zhangcl commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64742 [ run ] triggered by Bot. Commit: d489ac2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64742 [ run ] completed with state SUCCESS. Commit: d489ac2
/LLM/main/L0_MergeRequest_PR pipeline #52592 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl

zhangcl commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@NVIDIA/trt-llm-perf-devs can you help look at why the CI always fail in this test: unittest/tools/test_layer_wise_benchmarks.py ? This is link to the CI Agent Failure Analysis.

zhangcl added 3 commits August 9, 2026 21:23
Enable SM107 (Rubin, compute capability 10.7) as a recognized architecture
in the build system and architecture-detection helpers.

- cuda_configuration.cmake: add 107 to the default architecture list, the
  compatibility base, and the list of architectures with kernels. Map 107 to
  the SM100 family (100f) so Rubin reuses SM100-family kernels.
- cudaUtils.h / _utils.py: extend the SM100-family predicate to cover the
  10.x range, and let isSM100Family() accept an explicit SM version.
- conftest.py: add skip_no_rubin / skip_pre_rubin test markers.

The architecture append is gated on CUDA >= 13.4, which is the first toolkit
that supports sm_107 (PTX ISA 9.4). Earlier toolkits reject the architecture:
CUDA 13.3 nvcc reports "Unsupported gpu architecture 'sm_107'".

Verified on B200 (sm_100) that this is a no-op for Blackwell: with CUDA 13.3
the resolved architecture list, family list and CMAKE_CUDA_ARCHITECTURES are
byte-identical to the unpatched tree, a full sm_100 build succeeds, and
tests/unittest/_torch/thop/parallel/test_fp8_quantize.py and
test_fp8_block_scale_gemm.py pass (354 passed, 65 skipped, 0 failed).

Signed-off-by: Chulian Zhang <851104+zhangcl@users.noreply.github.com>
std::optional::value_or() evaluates its argument unconditionally, so
isSM100Family(sm) still called getSMVersion() even when an explicit SM
version was supplied. That defeats the purpose of the parameter and makes
the call throw on hosts with no CUDA device, since getSMVersion() runs
check_cuda_error().

Use a conditional so the fallback is only evaluated when the caller did not
supply a version. The no-argument path, which is what every current caller
uses, is unchanged.

Reported by CodeRabbit on NVIDIA#17336.

Signed-off-by: Chulian Zhang <851104+zhangcl@users.noreply.github.com>
Follow-up to review feedback on NVIDIA#17336.

Adding 107 to ARCHITECTURES_COMPATIBILITY_BASE made every kernel build a
separate sm_107 variant, since that list selects the architectures code is
actually generated for. Rubin does not need its own kernel set: sm_100f
cubins run on sm_107, and SM103 is already handled this way.

Drop 107 from the compatibility base so it folds into 100 like 103 does, and
drop the special case that appended 100f to the families list. The special
case only existed to compensate for the base change: once 107 folds into 100,
CMAKE_CUDA_ARCHITECTURES_NORMALIZED_LIST contains 100 and the families list
gets 100f on its own.

Verified with an isolated harness over setup_cuda_architectures():

  CUDA 13.4 (simulated), CMAKE_CUDA_ARCHITECTURES=all
    before: FAMILIES [100f;120f;107f;100f]
            ARCHITECTURES 80-real;86-real;90a-real;100f-real;120f-real;107f-real
    after:  FAMILIES [100f;120f]
            ARCHITECTURES 80-real;86-real;90a-real;100f-real;120f-real

  CUDA 13.2 (real): unchanged, 107 absent as before.

The before case also shows 100f appended twice, which the removal fixes.

Kernels that benefit from 107a can opt in per target via
add_cuda_architectures / set_cuda_architectures, as cutlass_kernels does for
FP4 GroupGEMM with 100f/103a/120f.

Signed-off-by: Chulian Zhang <851104+zhangcl@users.noreply.github.com>
@zhangcl
zhangcl force-pushed the rubin/pr1-sm107-arch-enablement branch from d489ac2 to 383b9ca Compare August 9, 2026 13:24
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@zhangcl

zhangcl commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64851 [ run ] triggered by Bot. Commit: 383b9ca Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64851 [ run ] completed with state SUCCESS. Commit: 383b9ca
/LLM/main/L0_MergeRequest_PR pipeline #52692 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhangcl

zhangcl commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65011 [ run ] triggered by Bot. Commit: 383b9ca Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65011 [ run ] completed with state SUCCESS. Commit: 383b9ca
/LLM/main/L0_MergeRequest_PR pipeline #52821 completed with status: 'SUCCESS'

CI Report

Link to invocation

@zhangcl
zhangcl merged commit 9f92665 into NVIDIA:main Aug 10, 2026
10 checks passed
xinhe-nv pushed a commit to xinhe-nv/TensorRT-LLM that referenced this pull request Aug 11, 2026
…ion (NVIDIA#17336)

Signed-off-by: Chulian Zhang <851104+zhangcl@users.noreply.github.com>
Co-authored-by: Chulian Zhang <851104+zhangcl@users.noreply.github.com>
Signed-off-by: Xin He (SW-GPU) <200704525+xinhe-nv@users.noreply.github.com>
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.

7 participants