Skip to content

[Nightly][BugFix][v0.13.0] Remove kv_cache nz test case for test_mla_preprocess_nq.py#6506

Closed
whx-sjtu wants to merge 1 commit intovllm-project:releases/v0.13.0from
whx-sjtu:fix_mlapo_ci
Closed

[Nightly][BugFix][v0.13.0] Remove kv_cache nz test case for test_mla_preprocess_nq.py#6506
whx-sjtu wants to merge 1 commit intovllm-project:releases/v0.13.0from
whx-sjtu:fix_mlapo_ci

Conversation

@whx-sjtu
Copy link
Copy Markdown
Collaborator

@whx-sjtu whx-sjtu commented Feb 3, 2026

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.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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

  • Test Case Removal: The 'nzcache' test case has been removed from 'test_mla_preprocess_nq.py' because it is not supported in bf16 scenarios, which was causing test failures.
  • Test Function Modification: The 'test_mla_preprocess_kernel' function's parameterization for 'cache_mode' was removed, and the 'cache_mode' argument within the function call is now hardcoded to 'krope_ctkv'.

🧠 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
  • tests/e2e/nightly/single_node/ops/singlecard_ops/test_mla_preprocess_nq.py
    • Removed the '@pytest.mark.parametrize' decorator that was used to test different 'cache_mode' values.
    • Updated the 'test_mla_preprocess_kernel' function signature to no longer accept a 'cache_mode' argument.
    • Hardcoded the 'cache_mode' parameter to 'krope_ctkv' within the 'mla_preprocess_kernel' function call.
Activity
  • The pull request was opened by whx-sjtu as a bug fix for the v0.13.0 release.
  • It specifically targets an unsupported 'kv_cache nz' test case in bf16 scenarios.
  • This change is a cherry-pick from a related pull request: '[Nightly][BugFix] Remove kv_cache nz test case for test_mla_preprocess_nq.py #6505'.
  • The author confirmed that this PR introduces no user-facing changes.
  • Existing CI tests passed successfully after the patch was applied.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +12 to +14

@torch.inference_mode()
def test_mla_preprocess_kernel(cache_mode: str):
def test_mla_preprocess_kernel():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
@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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This should use the cache_mode parameter from the test function to work with the pytest.mark.parametrize decorator suggested above.

Suggested change
cache_mode="krope_ctkv",
cache_mode=cache_mode,

@whx-sjtu whx-sjtu added the ready read for review label Feb 3, 2026
Signed-off-by: whx-sjtu <2952154980@qq.com>
@wangxiyuan
Copy link
Copy Markdown
Collaborator

we don't need this for 0.13.0 branch. Let' close this. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready read for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants