fix the server_args condition#11461
fix the server_args condition#11461zhyncs merged 3 commits intosgl-project:bhe/1_stage_triton_kernelfrom
Conversation
Summary of ChangesHello @zminglei, 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 refines the server argument handling, specifically addressing the conditions under which radix cache is disabled for deterministic inference. It expands the compatibility list for radix cache to include the 'triton' attention backend, ensuring that systems utilizing Triton can leverage radix cache without it being inadvertently turned off. This change improves the accuracy of configuration for various attention backend setups. Highlights
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
|
There was a problem hiding this comment.
Code Review
This pull request correctly fixes the logic for handling deterministic inference with different attention backends. It adds 'triton' to the list of backends that support radix cache and ensures that radix cache is properly disabled for unsupported backends by uncommenting self.disable_radix_cache = True. The change is correct and improves the robustness of the server configuration.
| if self.attention_backend != "fa3": | ||
| # self.disable_radix_cache = True | ||
| # Currently, only FA3, Triton supports radix cache. Support for other backends is in progress | ||
| if self.attention_backend not in ["fa3", "triton"]: |
There was a problem hiding this comment.
For improved readability and maintainability, it would be beneficial to extract the hardcoded list ["fa3", "triton"] into a named constant, for example DETERMINISTIC_RADIX_CACHE_BACKENDS, defined alongside other similar constants at the top of the file. This would make the code cleaner and easier to update when more backends add support for this feature.
Motivation
fix the server_args condition
fix lint
Modifications
fix the server_args condition
Accuracy Tests
Qwen3-8B TP4
Qwen3-30B-A3B TP4
Benchmarking and Profiling
Checklist