[Nightly][BugFix][v0.13.0] Remove kv_cache nz test case for test_mla_preprocess_nq.py#6506
[Nightly][BugFix][v0.13.0] Remove kv_cache nz test case for test_mla_preprocess_nq.py#6506whx-sjtu wants to merge 1 commit intovllm-project:releases/v0.13.0from
Conversation
Summary of ChangesHello @whx-sjtu, 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 bug by removing an unsupported 'kv_cache' test case ('nzcache') from the 'test_mla_preprocess_nq.py' suite. This specific test case was failing in 'bf16' environments, and its removal ensures that the test suite accurately reflects supported functionalities, thereby preventing false negatives and maintaining the stability and reliability of the continuous integration pipeline. 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
|
There was a problem hiding this comment.
Code Review
This pull request removes the 'nzcache' test case from test_mla_preprocess_nq.py because it is not supported in the bf16 scenario. While this fixes the failing test, a better approach is to mark the failing test case with pytest.mark.xfail. This keeps the test in the suite for future reference and automatically notifies you if it starts passing. I've provided suggestions to implement this.
|
|
||
| @torch.inference_mode() | ||
| def test_mla_preprocess_kernel(cache_mode: str): | ||
| def test_mla_preprocess_kernel(): |
There was a problem hiding this comment.
Instead of removing the 'nzcache' test case entirely, it's better practice to mark it as an expected failure using pytest.mark.xfail. This keeps the test in the suite, documents why it's disabled, and will notify you if it starts passing unexpectedly in the future (e.g., when bf16 support is added). This also requires reverting the hardcoded cache_mode on line 87.
| @torch.inference_mode() | |
| def test_mla_preprocess_kernel(cache_mode: str): | |
| def test_mla_preprocess_kernel(): | |
| @pytest.mark.parametrize("cache_mode", [ | |
| "krope_ctkv", | |
| pytest.param("nzcache", marks=pytest.mark.xfail(reason="not currently supported on bf16 scenario")), | |
| ]) | |
| @torch.inference_mode() | |
| def test_mla_preprocess_kernel(cache_mode: str): |
| None, | ||
| None, | ||
| cache_mode=cache_mode, | ||
| cache_mode="krope_ctkv", |
Signed-off-by: whx-sjtu <2952154980@qq.com>
91643bb to
d8c6928
Compare
|
we don't need this for 0.13.0 branch. Let' close this. Thanks |
What this PR does / why we need it?
Remove kv_cache nz test case for test_mla_preprocess_nq.py. This case is added by #3072 but has not been tested on bf16 scenario. Results show that this is not currently supported.
Cherry-pick from #6505.
Does this PR introduce any user-facing change?
No
How was this patch tested?
CI passed with existing test.