Skip to content

[None][chore] Clean up GPU architecture handling - #20137

Merged
tongyuantongyu merged 15 commits into
NVIDIA:mainfrom
tongyuantongyu:ytong/unify_sm
Oct 29, 2026
Merged

tongyuantongyu merged 15 commits into
NVIDIA:mainfrom
tongyuantongyu:ytong/unify_sm

Conversation

@tongyuantongyu

@tongyuantongyu tongyuantongyu commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Dev Engineer Review

  • Removes -real suffixes from build defaults, documentation, CI, Docker, Slurm, and runtime guidance.
  • Adds C++ and Python APIs for built and supported CUDA architectures.
  • Adds runtime architecture validation during executor and visual-generation worker setup.
  • Removes SM121-to-SM120 aliasing and standardizes SM120-family checks through isSM120Family and is_sm_120f.
  • Updates attention, GEMM, MoE, Marlin, MLA, quantization, speculative-decoding, and visual-generation dispatch.
  • Expands ARM64 defaults to SM103, SM107, SM120, and SM121. Verify build size, build time, and kernel availability.
  • Some MoE compile-time paths still distinguish capability 120 from the wider SM120 family. Verify intended SM121 behavior.
  • Review-finding severity counts are unavailable.
  • Supplied CI results include failures and an aborted run. No successful full-validation result is available.

QA Engineer Review

  • Adds tests/unittest/others/test_cuda_architecture_check.py for architecture metadata, exact matching, built-versus-supported checks, and device validation.
  • Updates tests for architecture parsing and SM120-family behavior across attention, MoE, Marlin, MNNVL, visual generation, model loading, and model-specific paths.
  • Adds the architecture-check test to tests/integration/test_lists/test-db/l0_a10.yml.
  • No changed test is shown in a manual-QA list.
  • Coverage verdict: needs follow-up. The tests cover the new APIs and family predicates, but SM121 behavior and failed CI paths require further validation.

Per-File QA Perspective

Source and build files

  • cpp/cmake/modules/cuda_configuration.cmake: Verify suffix normalization, SM121 support, default selection, and rejection of architectures without compiled kernels.
  • cpp/include/tensorrt_llm/common/cudaArchitectures.h: Verify the public architecture-query and validation API.
  • cpp/tensorrt_llm/common/cudaArchitectures.cpp: Verify built-versus-supported classification and all device error paths.
  • cpp/tensorrt_llm/common/CMakeLists.txt: Verify compile definitions contain the intended architecture lists.
  • cpp/include/tensorrt_llm/common/cudaUtils.h and tensorrt_llm/_utils.py: Verify SM121 reporting and consistent SM120-family predicates.
  • Changed attention, GEMM, MoE, Marlin, MLA, quantization, speculative-decoding, and visual-generation files: Verify family dispatch, SM121 behavior, changed FP8/NVFP4 restrictions, and unsupported-device errors.
  • cpp/tensorrt_llm/nanobind/bindings.cpp: Verify Python exposure of architecture metadata and validation methods.
  • tensorrt_llm/executor/base_worker.py and tensorrt_llm/_torch/visual_gen/executor.py: Verify validation occurs after device selection and before model or distributed initialization.
  • cpp/tensorrt_llm/kernels/trtllmGenKernels/fmha/CMakeLists.txt: Verify architecture 100, 103, 107, and 100f filtering and cubin registration.
  • scripts/build_wheel.py: Verify semicolon-separated architecture parsing, suffix warnings, and Volta rejection.
  • Build, Docker, Jenkins, Slurm, example, and documentation files: Verify unsuffixed architecture values match executed commands and platform defaults.

Test files

  • tests/unittest/others/test_cuda_architecture_check.py: Covers architecture metadata, exact matching, build support, and device validation. It is listed in the A10 CI test list.
  • tests/unittest/scripts/test_build_wheel_copy_back.py: Covers unsuffixed architecture parsing and suffix compatibility cases.
  • Changed attention, MoE, Marlin, MNNVL, visual-generation, model-loading, and model-specific tests: Verify updated SM120-family skips, dispatch guards, and mocks.
  • tests/integration/test_lists/test-db/l0_a10.yml: Verify the architecture-check test runs in the intended A10 job.

Description

  • Cherry pick [None][feat] Enable Rubin architecture, fail early on unsupported architectures #19950
    • Enable Rubin architecture properly
    • Explicitly check that TensorRT-LLM is built with the architecture it runs on
  • Remove the special aliasing of SM121 -> SM120
    • -a "121" is now required to support SM121. -a "120;121" still builds only the sm120f version of the kernel.
    • SM12x detection is now migrated to is_sm_120f instead of manually test sm in [120, 121], to align with is_sm_100f.
  • Remove the -real suffix when defining architectures during build
    • cuda_configuration.cmake normalizes that, and user should specify the exact architectures they want to support. Adding -real now generate warning, so users don't misunderstand the meaning.
    • Cleanup the doc.

Test Coverage

Build tweaks. Passing build and current tests are enough.

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.

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77227 [ run ] triggered by Bot. Commit: a8d6315 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77227 [ run ] completed with state SUCCESS. Commit: a8d6315
/LLM/main/L0_MergeRequest_PR pipeline #63665 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

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77677 [ run ] triggered by Bot. Commit: 0000366 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77677 [ run ] completed with state FAILURE. Commit: 0000366
/LLM/main/L0_MergeRequest_PR pipeline #64036 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

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77741 [ run ] triggered by Bot. Commit: 095d567 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77741 [ run ] completed with state SUCCESS. Commit: 095d567
/LLM/main/L0_MergeRequest_PR pipeline #64087 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

@tongyuantongyu
tongyuantongyu marked this pull request as ready for review October 15, 2026 09:42
@tongyuantongyu
tongyuantongyu requested review from a team as code owners October 15, 2026 09:42
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80878 [ run ] triggered by Bot. Commit: 88d1a70 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80878 [ run ] completed with state SUCCESS. Commit: 88d1a70
/LLM/main/L0_MergeRequest_PR pipeline #66605 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

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

# Conflicts:
#	tensorrt_llm/_torch/modules/linear.py
@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81057 [ run ] triggered by Bot. Commit: 5e6d38d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81057 [ run ] completed with state FAILURE. Commit: 5e6d38d
/LLM/main/L0_MergeRequest_PR pipeline #66771 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

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81305 [ run ] triggered by Bot. Commit: 5e6d38d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81305 [ run ] completed with state SUCCESS. Commit: 5e6d38d
/LLM/main/L0_MergeRequest_PR pipeline #66997 completed with status: 'SUCCESS'

CI Report

Link to invocation

# Conflicts:
#	tensorrt_llm/_torch/modules/linear.py
@tongyuantongyu
tongyuantongyu enabled auto-merge (squash) October 29, 2026 06:04
@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot skip --comment "trivial merge"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81364 [ skip ] triggered by Bot. Commit: 272ced9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81364 [ skip ] completed with state SUCCESS. Commit: 272ced9
Skipping testing for commit 272ced9

Link to invocation

@tongyuantongyu
tongyuantongyu merged commit 87ce6f1 into NVIDIA:main Oct 29, 2026
8 checks passed
@tongyuantongyu
tongyuantongyu deleted the ytong/unify_sm branch October 29, 2026 09:46
Dorijan10 added a commit to Dorijan10/TensorRT-LLM-Optimisation that referenced this pull request Oct 29, 2026
PR NVIDIA#20137 gives the dense FP8 block-scale Linear its SM121 path.

Signed-off-by: Dorian Donaj Magasic <dorian.magasic@turintech.ai>
Dorijan10 added a commit to Dorijan10/TensorRT-LLM-Optimisation that referenced this pull request Oct 29, 2026
Resolve linear.py against NVIDIA#20833, so the tuned call uses the new weight argument, and adapt cublasScaledMM.cpp to NVIDIA#20137, which removed the queryRealSmArch argument of getSMVersion().

Signed-off-by: Dorian Donaj Magasic <dorian.magasic@turintech.ai>
SimengLiu-nv pushed a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 2, 2026
….3: Restore Mistral Large 3 multimodal inference

Forward-port of release/1.3 PR NVIDIA#19788
(release/1.3 commit 48c796c) to main.

Adapted to main: adopts main's MultimodalItemMetadata contract from
_build_mm_item_metadata and exposes it through get_mm_item_metadata, and
the new tests call get_mm_item_metadata and compare against the tuples
that MultimodalItemMetadata now stores.

Also: the HF tokenizer load in MistralHFInputProcessor follows the
trust_remote_code argument like the processor load next to it, and
build_fmha_head104_tests requests dynamic NVRTC linking and passes plain
architecture numbers (NVIDIA#20137) like the other configure-only gtest
fixtures, so the target does not depend on a configure cache left by an
earlier fixture.

Signed-off-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Co-authored-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Signed-off-by: Simeng Liu <simengl@nvidia.com>
SimengLiu-nv pushed a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 2, 2026
….3: Restore Mistral Large 3 multimodal inference

Forward-port of release/1.3 PR NVIDIA#19788
(release/1.3 commit 48c796c) to main.

Adapted to main: adopts main's MultimodalItemMetadata contract from
_build_mm_item_metadata and exposes it through get_mm_item_metadata, and
the new tests call get_mm_item_metadata and compare against the tuples
that MultimodalItemMetadata now stores.

Also: the HF tokenizer load in MistralHFInputProcessor follows the
trust_remote_code argument like the processor load next to it, and
build_fmha_head104_tests requests dynamic NVRTC linking and passes plain
architecture numbers (NVIDIA#20137) like the other configure-only gtest
fixtures, so the target does not depend on a configure cache left by an
earlier fixture. It also regenerates the FMHA sources, so a stale
generation stamp cannot hide the head-104 generator changes, and
fmhaHead104Test is registered with add_tllm_gtest (OWNER, LABELS,
FULL_STACK) as main asks for new C++ tests (NVIDIA#21022).

Signed-off-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Co-authored-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Signed-off-by: Simeng Liu <simengl@nvidia.com>
SimengLiu-nv pushed a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 3, 2026
….3: Restore Mistral Large 3 multimodal inference

Forward-port of release/1.3 PR NVIDIA#19788
(release/1.3 commit 48c796c) to main.

Adapted to main: adopts main's MultimodalItemMetadata contract from
_build_mm_item_metadata and exposes it through get_mm_item_metadata, and
the new tests call get_mm_item_metadata and compare against the tuples
that MultimodalItemMetadata now stores.

Also: the HF tokenizer load in MistralHFInputProcessor follows the
trust_remote_code argument like the processor load next to it, and
build_fmha_head104_tests requests dynamic NVRTC linking and passes plain
architecture numbers (NVIDIA#20137) like the other configure-only gtest
fixtures, so the target does not depend on a configure cache left by an
earlier fixture. It also regenerates the FMHA sources, so a stale
generation stamp cannot hide the head-104 generator changes, and
fmhaHead104Test is registered with add_tllm_gtest (OWNER, LABELS,
FULL_STACK) as main asks for new C++ tests (NVIDIA#21022).

Signed-off-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Co-authored-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Signed-off-by: Simeng Liu <simengl@nvidia.com>
SimengLiu-nv pushed a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 3, 2026
….3: Restore Mistral Large 3 multimodal inference

Forward-port of release/1.3 PR NVIDIA#19788
(release/1.3 commit 48c796c) to main.

Adapted to main: adopts main's MultimodalItemMetadata contract from
_build_mm_item_metadata and exposes it through get_mm_item_metadata, and
the new tests call get_mm_item_metadata and compare against the tuples
that MultimodalItemMetadata now stores.

Also: the HF tokenizer load in MistralHFInputProcessor follows the
trust_remote_code argument like the processor load next to it, and
build_fmha_head104_tests requests dynamic NVRTC linking and passes plain
architecture numbers (NVIDIA#20137) like the other configure-only gtest
fixtures, so the target does not depend on a configure cache left by an
earlier fixture. It also regenerates the FMHA sources, so a stale
generation stamp cannot hide the head-104 generator changes, and
fmhaHead104Test is registered with add_tllm_gtest (OWNER, LABELS,
FULL_STACK) as main asks for new C++ tests (NVIDIA#21022).

Signed-off-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Co-authored-by: Pranav Shrestha <254760092+pranav-nvidia@users.noreply.github.com>
Signed-off-by: Simeng Liu <simengl@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.