Add sm90 guard to fence.acquire#2535
Conversation
Summary of ChangesHello @jhalabi-nv, 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 addresses a compatibility issue with newer CUDA 13.x toolkits by modifying a CUDA kernel to conditionally use the appropriate memory fence instruction. The change ensures that 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
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
|
📝 WalkthroughWalkthroughInserted an architecture-conditional system memory fence into Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 introduces a necessary compatibility fix by guarding the fence.acquire.sys instruction with a check for SM90+ architectures in moeA2ACombineKernel. For older architectures, it correctly falls back to __threadfence_system(). This change ensures that the code can be compiled with newer CUDA toolkits for a wider range of GPU architectures. The implementation is correct and follows existing patterns in the codebase for handling architecture-specific features.
While the change itself is correct, I'd like to point out that moeA2ADispatchKernel might use a similar synchronization pattern, as both MoeA2ADispatchParams and MoeA2ACombineParams contain completion_flags. It would be worth verifying if moeA2ADispatchKernel also contains an unguarded fence.acquire.sys that needs a similar fix to ensure complete compatibility.
|
@jhalabi-nv please rebase the PR onto the latest main to kick off CI. |
83055ee to
9ff16e8
Compare
|
/bot run |
|
@jhalabi-nv is not authorized to trigger this CI job. cc: @yzh119, @sricketts, @yongwww |
|
@yongwww , can you trigger the CI for me? I've rebased on main |
|
/bot run |
triggered, and have added you to the allowed list. |
|
[FAILED] Pipeline #43835611: 14/20 passed |
📌 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
The sm90 guard is needed to build flashinfer-jit-cache with later versions of the cuda 13.x toolkit
Summary by CodeRabbit