fix: allow fmha_v2_prefill_deepseek on SM121 (DGX Spark)#2559
fix: allow fmha_v2_prefill_deepseek on SM121 (DGX Spark)#2559jimmyzho merged 1 commit intoflashinfer-ai:mainfrom
Conversation
Summary of ChangesHello @blake-snc, 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 enhances 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
|
📝 WalkthroughWalkthroughThe PR relaxes the GPU architecture check for fmha_v2_prefill_deepseek to accept SM12x GPUs (SM120A or SM121A) instead of SM120A-only, and updates the corresponding test skip condition and messages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 correctly extends support for fmha_v2_prefill_deepseek to SM12.1 GPUs by updating the hardware capability check. The change is applied to both the function implementation and its corresponding test, ensuring correctness and maintainability. The updated error message and test skip message are also clear and accurate. The implementation is clean and follows the existing pattern in the codebase. Overall, this is a good and necessary fix.
The `fmha_v2_prefill_deepseek` function only checked `is_sm120a_supported()` which requires SM12.0 (RTX 5090). This excluded SM12.1 devices like NVIDIA DGX Spark (GB10) which support the same fmha_v2 SM120 kernels. The JIT compilation context already handles SM12.1 correctly via `supported_major_versions=[12]`, and the kernels compile and run successfully on SM12.1. Only the Python guard was blocking. Tested on DGX Spark (SM121a, CUDA 13.0): both BF16 and FP8 prefill produce correct results with no NaN. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0df2e31 to
db94171
Compare
|
/bot run |
|
[CANCELING] Pipeline #43999178: canceled |
Summary
fmha_v2_prefill_deepseek()only checkedis_sm120a_supported()(SM12.0), excluding SM12.1 devices like NVIDIA DGX Spark (GB10)supported_major_versions=[12]and the kernels work correctlyis_sm121a_supported()to the guard check, consistent with how other SM12x checks are done in the codebase (e.g.,prefill.py:106-107,gemm_base.py:3757)Validation
Tested on DGX Spark (GB10, SM121a, CUDA 13.0, flashinfer 0.6.2):
Test plan
test_fmha_v2_prefill_deepseektest updated with same fixis_sm120a_supportedcheck still in placeValueError: fmha_v2_prefill_deepseek is only supported on SM120 GPUs.on SM12.1Related: #2555
From Second Nature Computing — tested on NVIDIA DGX Spark.
🤖 Generated with Claude Code
Summary by CodeRabbit