Skip to content

fix(trtllm): restrict routed-MoE backends to supported architectures (release port for #4107) - #4230

Merged
kahyunnam merged 1 commit into
flashinfer-ai:release-v0.6.16from
kahyunnam:fix/4107-arch-filter-release
Jul 29, 2026
Merged

kahyunnam merged 1 commit into
flashinfer-ai:release-v0.6.16from
kahyunnam:fix/4107-arch-filter-release

Conversation

@kahyunnam

Copy link
Copy Markdown
Member

Description

Release-specific port of #4177 onto release-v0.6.16 for #4107.

On SM12x (Spark, RTX Pro 6000), TRTLLM routed-MoE backends were incorrectly
claiming support (arch >= 100) and then dispatching sm100f/sm103a cubins,
causing RuntimeError: Error occurred when running GEMM! or segfaults in
test_split_fused_moe_kernel_vs_reference.

Changes

  • csrc/trtllm_batched_gemm_runner.cu: Replace per-SM if-chains with
    isArchCompatible(); reject unknown cubin families; guard Sm107a behind
    #ifdef TLLM_RUBIN_FEATURES (only exists in the Rubin cubin pin's headers).
  • csrc/trtllm_gemm_runner.cu: Same arch filter for the plain GEMM runner
    (previously had no arch filtering at all).
  • flashinfer/fused_moe/api.py: Tighten Trtllm*Config.supported() from
    arch >= 100 to explicit allowlists _TRTLLM_ROUTED_ARCHS = (100, 103, 107)
    and _TRTLLM_ROUTED_FP8_ARCHS = (100, 103).
  • tests/moe_ep/test_split_fused_moe_kernel_vs_reference.py: Gate GPU tests
    on config_cls.supported(arch); add CPU contract tests + SM120 regression guard.

Release-specific notes

Verification

  • CPU tests: 36 passed, 2 skipped (test_split_fused_moe_kernel_vs_reference.py)
  • Backend claims: sm120/sm121 now fall back to Cutlass only (no Trtllm* backends)
  • Compile: isArchCompatible() builds cleanly against both default and Rubin BMM
    export headers; ported batched runner compiles against default pin

Related

Pre-existing issue (not in scope)

#4213 on release references options.mDtypeSfC, which does not exist in the
default BMM cubin pin's headers (only in the Rubin pin). This is a separate
release-only compile issue on the non-Rubin module, predating this port.

…(release)

Port of flashinfer-ai#4177 onto release-v0.6.16 for flashinfer-ai#4107. SM12x (Spark, RTX Pro 6000)
was mis-dispatching TRTLLM routed-MoE cubins built for sm100f/sm103a and
crashing at runtime.

- Add isArchCompatible() to batched-GEMM and GEMM runners; reject unknown
  cubin families and guard Sm107a behind TLLM_RUBIN_FEATURES (Rubin pin only)
- Tighten Trtllm*Config.supported() from arch >= 100 to explicit allowlists
  including sm107 on release
- Gate integration tests on config_cls.supported(arch); add CPU contract tests

Fixes flashinfer-ai#4107
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f351db2-9439-4552-b4f5-a179c4666550

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@kahyunnam
kahyunnam merged commit 29d360f into flashinfer-ai:release-v0.6.16 Jul 29, 2026
4 checks passed
aleozlx added a commit that referenced this pull request Jul 30, 2026
<!-- .github/pull_request_template.md -->

## 📌 Description

This PR relands SM 107 support to main branch (reverted in #4171) as
well as some other release fixes.

#### Cherry Picks
- #4191
- #4189
- #4200
- #4215
- #4225
- #4230
- #4235
- #4226
- #4257
- #4258 
- #4261

#### Other Changes
- Rubin guards from #4252's conflict resolution (`TLLM_RUBIN_FEATURES`:
SiTuGlu
static_asserts + tile-192 advertisement, compiled out for the Rubin BMM
pin)
- Test-contract update: `test_unified_moe.py` arch assertions written
post-revert
(#4159) flipped to the restored contract (FP4/BF16 claim 107; FP8 stays
100/103)

<!-- What does this PR do? Briefly describe the changes and why they’re
needed. -->

## 🔍 Related Issues

<!-- Link any related issues here -->

#4107, #4164, reverts #4171

## 🚀 Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull
request, please make sure the following items are complete.

### ✅ Pre-commit Checks

- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
- [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.

> If you are unsure about how to set up `pre-commit`, see [the
pre-commit documentation](https://pre-commit.com/).

## 🧪 Tests

- [ ] Tests have been added or updated as needed.
- [ ] All tests are passing (`unittest`, etc.).

## Reviewer Notes

<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added support for Rubin/SM107 GPUs across GEMM, MoE, attention,
quantization, sampling, and DeepGEMM workflows.
* Added architecture-aware kernel selection, memory sizing, compilation,
and artifact handling.
* **Bug Fixes**
* Improved validation and error messages for incompatible GPU
architectures and invalid kernel configurations.
  * Clearly rejects unsupported NVFP4 KV-cache operations on SM107.
* **Documentation**
  * Updated installation guidance with the SM107 architecture target.
* **Tests**
* Expanded architecture coverage and compatibility checks across GPU
test suites.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Vinnie6167 <Vinnie6167@users.noreply.github.com>
Co-authored-by: Ka-Hyun Nam <knam@nvidia.com>
Co-authored-by: Alex Yang <aleyang@nvidia.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Jimmy Zhou <79552142+jimmyzho@users.noreply.github.com>
@mhoqueanik

Copy link
Copy Markdown
Collaborator

#4177 started efforts to addresss the issue in restricting TRT-LLM routed-MoE and GEMM backends to supported architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants