[bugfix] Fix compilation failure when compiling csrc/trtllm_moe_allreduce_fusion.cu#1410
Conversation
…duce_fusion.cu This file includes FP4QuantizationSFLayout from `flashinfer/comm/trtllm_moe_allreduce_fusion.cuh` which still uses the old format. Signed-off-by: Po-Han Huang <pohanh@nvidia.com>
There was a problem hiding this comment.
Summary of Changes
Hello @nvpohanh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've addressed a compilation failure in csrc/trtllm_moe_allreduce_fusion.cu. The issue stemmed from an outdated reference to an FP4QuantizationSFLayout enum member. This pull request updates the enum usage to its correct, current form, ensuring the file compiles successfully.
Highlights
- Compilation Fix: Corrected the usage of
FP4QuantizationSFLayoutincsrc/trtllm_moe_allreduce_fusion.cuby changing the default value fromSWIZZLED_128x4toSWIZZLED. This change directly addresses a compilation failure by aligning the code with the current definition of the enum.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
We should choose either this one or #1403 but not both. |
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a compilation error in csrc/trtllm_moe_allreduce_fusion.cu. The error was caused by an outdated enum member name, FP4QuantizationSFLayout::SWIZZLED_128x4, which has been updated to FP4QuantizationSFLayout::SWIZZLED to match the current definition in flashinfer/comm/trtllm_moe_allreduce_fusion.cuh. The change is accurate and necessary. The code is clean, and I have no further comments.
This includes the fix needed for FlashInfer AOT compilation failures. See: flashinfer-ai/flashinfer#1403 and flashinfer-ai/flashinfer#1410 Signed-off-by: Po-Han Huang <pohanh@nvidia.com>
<!-- .github/pull_request_template.md --> ## 📌 Description Currently comm modules and moe modules are not compiled in aot unittests, which results in lots of issues such as #1371 #1410, and #1530. This PR adds these modules to aot UT to make sure we capture the potential compilation error of these modules. #1531 (a bugfix) changes were ported into this PR to test together. ## 🔍 Related Issues #1371, #1410, #1530, #1531 ## 🚀 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 - [x] Tests have been added or updated as needed. - [ ] All tests are passing (`unittest`, etc.). ## Reviewer Notes cc @nvpohanh @weireweire --------- Co-authored-by: Yaxing Cai <yaxingc@nvidia.com> Co-authored-by: Zihao <zihaoy@nvidia.com> Co-authored-by: Zihao Ye <expye@outlook.com>
[bugfix] Fix compilation failure when compiling csrc/trtllm_moe_allreduce_fusion.cu
This file includes FP4QuantizationSFLayout from
flashinfer/comm/trtllm_moe_allreduce_fusion.cuhwhich still uses the old format.📌 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
pre-commitby runningpip install pre-commit(or used your preferred method).pre-commit install.pre-commit run --all-filesand fixed any reported issues.🧪 Tests
unittest, etc.).Reviewer Notes