[CI][Bugfix] Fix test isolation in block_int8/ptpc_fp8 MoE kernel tests (#49609)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Nick Hill committed
Jul 23, 2026 at 18:26 UTC
46f01a50acd6862806ed67b88176c96c2b161142
2 files changed
+4
-4
tests/kernels/moe/test_block_int8.py
+2
-2
@@ -82,9 +82,9 @@ def torch_w8a8_block_int8_moe(a, w1, w2, w1_s, w2_s, score, topk, block_shape):
82
).sum(dim=1)
83
84
85
-@pytest.fixture(autouse=True, scope="module")
85
+@pytest.fixture(autouse=True)
86
def setup_cuda():
87
- """Sets the default CUDA device for all tests in this module."""
87
+ """Sets the default CUDA device before each test in this module."""
88
torch.set_default_device("cuda")
89
90
tests/kernels/moe/test_triton_moe_ptpc_fp8.py
+2
-2
@@ -102,9 +102,9 @@ def torch_w8a8_per_column_moe(a, w1, w2, w1_s, w2_s, score, topk):
102
).sum(dim=1)
103
104
105
-@pytest.fixture(autouse=True, scope="module")
105
+@pytest.fixture(autouse=True)
106
def setup_cuda():
107
- """Sets the default CUDA device for all tests in this module."""
107
+ """Sets the default CUDA device before each test in this module."""
108
torch.set_default_device("cuda")
109
110