[sgl-kernel] fix b200 kernel ci#13907
Conversation
Co-authored-by: HydraQYH <qyh820@outlook.com>
Summary of ChangesHello @FlamingoPg, 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 and resolves continuous integration (CI) failures on B200 systems by refining the device capability checks within kernel tests. The changes ensure that specific FP8-related kernel operations and FlashMLA tests are only executed on hardware that explicitly supports the required SM90 architecture, thereby preventing failures on incompatible systems and improving the reliability of the CI pipeline. 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 aims to fix CI failures on B200 (SM100) hardware. The changes involve disabling some tests for FP8 kernels on SM100 architecture by restricting them to SM90, likely as a temporary measure to get the CI pipeline passing. Additionally, a helper function to check for SM90 support has been added to test_flashmla.py, which is a duplicate of an existing function. My feedback focuses on addressing this code duplication to improve maintainability.
| def is_sm90_supported(device=None) -> bool: | ||
| return (torch.cuda.get_device_capability(device)[0] == 9) and ( | ||
| torch.version.cuda >= "12.3" | ||
| ) |
There was a problem hiding this comment.
This is_sm90_supported function is a duplicate of the one in sgl-kernel/tests/test_es_fp8_blockwise_moe.py. To follow the DRY (Don't Repeat Yourself) principle and improve maintainability, this function should be defined in a single, shared location, such as a test utilities file (e.g., sgl-kernel/tests/utils.py or sgl-kernel/tests/conftest.py), and imported into both test modules.
Co-authored-by: HydraQYH <qyh820@outlook.com>
Co-authored-by: HydraQYH <qyh820@outlook.com>
Motivation
Fix failed B200 CI, partly adapted from #13731
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist