fix: add missing re-exports for rmsnorm quant and fused_add_rmsnorm q…#2783
Conversation
…uant Signed-off-by: Devashish Lal <devcode@fb.com>
Summary of ChangesHello, 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 an oversight by exposing two new quantization-aware normalization functions, 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
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds two new public exports to the flashinfer package namespace: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
There was a problem hiding this comment.
Code Review
This pull request correctly adds missing re-exports for rmsnorm_quant and fused_add_rmsnorm_quant in the top-level __init__.py file. My feedback focuses on improving the code style of the import statements for better readability and maintainability by sorting them and removing redundant aliases, following PEP 8 guidelines.
| from .norm import fused_add_rmsnorm as fused_add_rmsnorm | ||
| from .norm import fused_add_rmsnorm_quant as fused_add_rmsnorm_quant | ||
| from .norm import layernorm as layernorm | ||
| from .norm import gemma_fused_add_rmsnorm as gemma_fused_add_rmsnorm | ||
| from .norm import gemma_rmsnorm as gemma_rmsnorm | ||
| from .norm import rmsnorm as rmsnorm | ||
| from .norm import rmsnorm_quant as rmsnorm_quant |
There was a problem hiding this comment.
For better code readability and consistency, it's a good practice to sort imports alphabetically and remove redundant aliases (e.g., import foo as foo). This block of imports from .norm could be reordered and cleaned up to follow PEP 8 guidelines.
| from .norm import fused_add_rmsnorm as fused_add_rmsnorm | |
| from .norm import fused_add_rmsnorm_quant as fused_add_rmsnorm_quant | |
| from .norm import layernorm as layernorm | |
| from .norm import gemma_fused_add_rmsnorm as gemma_fused_add_rmsnorm | |
| from .norm import gemma_rmsnorm as gemma_rmsnorm | |
| from .norm import rmsnorm as rmsnorm | |
| from .norm import rmsnorm_quant as rmsnorm_quant | |
| from .norm import fused_add_rmsnorm | |
| from .norm import fused_add_rmsnorm_quant | |
| from .norm import gemma_fused_add_rmsnorm | |
| from .norm import gemma_rmsnorm | |
| from .norm import layernorm | |
| from .norm import rmsnorm | |
| from .norm import rmsnorm_quant |
References
- PEP 8 recommends that imports are grouped and sorted. Within each group, imports should be sorted alphabetically. (link)
|
@bkryu can I get a review for this |
|
/bot run |
|
[FAILED] Pipeline #46561948: 14/20 passed |
add missing re-exports for rmsnorm quant and fused_add_rmsnorm quant
📌 Description
added missing imports in the top level
flashinfer/__init__.pyfile🔍 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