From 46f01a50acd6862806ed67b88176c96c2b161142 Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Thu, 23 Jul 2026 18:26:02 +0100 Subject: [PATCH] [CI][Bugfix] Fix test isolation in block_int8/ptpc_fp8 MoE kernel tests (#49609) Signed-off-by: Nick Hill Co-authored-by: Claude Opus 4.8 (1M context) --- tests/kernels/moe/test_block_int8.py | 4 ++-- tests/kernels/moe/test_triton_moe_ptpc_fp8.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/kernels/moe/test_block_int8.py b/tests/kernels/moe/test_block_int8.py index e35ca4caa9..415faafb3a 100644 --- a/tests/kernels/moe/test_block_int8.py +++ b/tests/kernels/moe/test_block_int8.py @@ -82,9 +82,9 @@ def torch_w8a8_block_int8_moe(a, w1, w2, w1_s, w2_s, score, topk, block_shape): ).sum(dim=1) -@pytest.fixture(autouse=True, scope="module") +@pytest.fixture(autouse=True) def setup_cuda(): - """Sets the default CUDA device for all tests in this module.""" + """Sets the default CUDA device before each test in this module.""" torch.set_default_device("cuda") diff --git a/tests/kernels/moe/test_triton_moe_ptpc_fp8.py b/tests/kernels/moe/test_triton_moe_ptpc_fp8.py index 0ab025dcec..01246325c8 100644 --- a/tests/kernels/moe/test_triton_moe_ptpc_fp8.py +++ b/tests/kernels/moe/test_triton_moe_ptpc_fp8.py @@ -102,9 +102,9 @@ def torch_w8a8_per_column_moe(a, w1, w2, w1_s, w2_s, score, topk): ).sum(dim=1) -@pytest.fixture(autouse=True, scope="module") +@pytest.fixture(autouse=True) def setup_cuda(): - """Sets the default CUDA device for all tests in this module.""" + """Sets the default CUDA device before each test in this module.""" torch.set_default_device("cuda")