bugfix: fix the enum/int type mismatch mentioned in #2507#2508
bugfix: fix the enum/int type mismatch mentioned in #2507#2508yzh119 merged 3 commits intoflashinfer-ai:mainfrom
Conversation
Summary of ChangesHello @yzh119, 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! This pull request resolves a reported bug concerning a type mismatch within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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
|
📝 WalkthroughWalkthroughReplaced enum-typed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent 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. Comment |
There was a problem hiding this comment.
Code Review
This pull request addresses a type mismatch issue in the trtllm_fp8_per_tensor_scale_moe function where an integer activation_type was passed to a function expecting an ActivationType enum. The change correctly wraps the integer value with the ActivationType enum constructor, resolving the bug. The fix is concise and accurate. I've reviewed other related functions and they do not appear to have the same issue. The change is approved.
Signed-off-by: Dimitrios Bariamis <[email protected]>
…others Signed-off-by: Dimitrios Bariamis <[email protected]>
|
I adapted the tests to match the function signature and made it consistent with the fp4 functions here: Feel free to include it in this PR, I didn't want to open a new one for the same thing to avoid confusion. |
|
|
|
Hi @dbari I have merged your commits.
@IwakuraRein Can you work on a follow up PR? This one might be merged into v0.6.4 as a hotfix. |
📌 Description
As mentioned in #2507,
trtllm_fp8_per_tensor_scale_moefunction would fail when passed integeractivation_type.This PR fixes the type mismatch.
🔍 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
Summary by CodeRabbit
Refactor
Tests