Skip to content

cherry-pick: #4180 ([feat] Add SITU trtllmgen MOE) + conflict resolution - #4252

Merged
jimmyzho merged 2 commits into
release-v0.6.16from
cherry-pick-4180-release-v0.6.16
Jul 30, 2026
Merged

jimmyzho merged 2 commits into
release-v0.6.16from
cherry-pick-4180-release-v0.6.16

Conversation

@jimmyzho

Copy link
Copy Markdown
Contributor

Add SiTU activation support for TRTLLM-Gen MoE for MXFP4 × MXFP8 and NVFP4 × NVFP4

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

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • 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
.

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).
  • New Features
  • Added SiTU gated activation support for FP4 MoE in routed and non-routed execution, with configurable per-expert gemm1_alpha, gemm1_beta, and gemm1_clamp_limit.
  • Extended FP4 MoE trace templates with an activation_type input to select SiTU.
  • Bug Fixes
  • Improved activation-type mapping/validation so SiTU uses the correct gated behavior.
  • Made MoE kernel/tile selection dtype-aware (activation + weight) and corrected per-token scaling eligibility during config generation.
  • Tests
  • Expanded MoE coverage for SiTU and optional per-expert parameters, including additional routed-logit and autotune regression checks.
  • Chores
    • Updated the remote BMM artifact reference and checksum.

(cherry picked from commit a34a735)

📌 Description

🔍 Related Issues

🚀 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

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • 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.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

<!-- .github/pull_request_template.md -->

Add SiTU activation support for TRTLLM-Gen MoE for MXFP4 × MXFP8 and
NVFP4 × NVFP4

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

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

- [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/).

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

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

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

* **New Features**
* Added SiTU gated activation support for FP4 MoE in routed and
non-routed execution, with configurable per-expert `gemm1_alpha`,
`gemm1_beta`, and `gemm1_clamp_limit`.
* Extended FP4 MoE trace templates with an `activation_type` input to
select SiTU.
* **Bug Fixes**
* Improved activation-type mapping/validation so SiTU uses the correct
gated behavior.
* Made MoE kernel/tile selection dtype-aware (activation + weight) and
corrected per-token scaling eligibility during config generation.
* **Tests**
* Expanded MoE coverage for SiTU and optional per-expert parameters,
including additional routed-logit and autotune regression checks.
* **Chores**
  * Updated the remote BMM artifact reference and checksum.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Siyuan Fu <siyuanf@nvidia.com>
Co-authored-by: Siyuan Fu <siyuanf@nvidia.com>
(cherry picked from commit a34a735)
@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: 8ed7d894-c1dd-4d90-9cea-c9a440c6551b

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.

… package

The Rubin fused-MoE module (fused_moe_trtllm_sm107, compiled with
-DTLLM_RUBIN_FEATURES) builds against TRTLLM_GEN_BMM_RUBIN, which
predates this feature:

- Its gemmGatedAct::ActType is {SwiGlu, GeGlu, None} with None == 2, so
  the SiTuGlu/None static_asserts in KernelRunner.h fail name lookup and
  break every Rubin fused-MoE build, not only SITU.
- It has no 192-tile FP4 kernels (its only 192-tile kernels are FP8).
  Launchers are built eagerly for every advertised tile, so advertising
  192 makes FP4BlockScaleLauncher construction throw for every
  NVFP4xNVFP4 / MXFP4xMXFP8 MoE call on Rubin.

Guard both behind TLLM_RUBIN_FEATURES; remove the guards together when
the Rubin pin is bumped to a package that carries SiTuGlu and 192-tile
FP4 kernels. SITU requests on Rubin fail with the existing clean
no-valid-configs error.
@jimmyzho jimmyzho changed the title cherry-pick: #4180 ([feat] Add SITU trtllmgen MOE) cherry-pick: #4180 ([feat] Add SITU trtllmgen MOE) + conflict resolution Jul 30, 2026
@jimmyzho
jimmyzho merged commit c4053a2 into release-v0.6.16 Jul 30, 2026
5 checks passed
@jimmyzho
jimmyzho deleted the cherry-pick-4180-release-v0.6.16 branch July 30, 2026 03:54
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>
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.

4 participants