Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import gc

import pytest
import torch
import torch_npu

Expand All @@ -9,9 +8,8 @@
enable_custom_op()


@pytest.mark.parametrize("cache_mode", ["krope_ctkv", "nzcache"])
@torch.inference_mode()
def test_mla_preprocess_kernel(cache_mode: str):
def test_mla_preprocess_kernel():
token_num = 1
head_num = 2
N_7168 = 7168
Expand Down Expand Up @@ -84,7 +82,7 @@ def test_mla_preprocess_kernel(cache_mode: str):
None,
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,

quant_mode="no_quant",
enable_inner_out=False,
q_out0=q_nope_out,
Expand Down