diff --git a/tests/kernels/quantization/test_block_fp8.py b/tests/kernels/quantization/test_block_fp8.py index 52f87c403e..fd530e7ffb 100644 --- a/tests/kernels/quantization/test_block_fp8.py +++ b/tests/kernels/quantization/test_block_fp8.py @@ -406,5 +406,7 @@ def test_w8a8_block_fp8_b12x_matmul(M, N, K): ref_out.float().flatten(), dim=0, ) - assert rel_diff < 0.002 - assert cosine >= 0.9999 + # Four-way split-K uses atomic BF16 reductions, so nondeterministic atomic + # ordering can flap an output between adjacent BF16 values one ULP apart. + assert rel_diff < 0.003 + assert cosine >= 0.99999 diff --git a/tests/model_executor/kernels/test_b12x_linear.py b/tests/model_executor/kernels/test_b12x_linear.py index 36a0896ea6..27368ead27 100644 --- a/tests/model_executor/kernels/test_b12x_linear.py +++ b/tests/model_executor/kernels/test_b12x_linear.py @@ -785,6 +785,11 @@ def test_b12x_backend_preserves_w4a16_fallback(monkeypatch) -> None: monkeypatch.setattr(linear_mod.current_platform, "_enum", PlatformEnum.CUDA) monkeypatch.setattr(linear_mod, "_get_linear_backend", lambda: "b12x") + monkeypatch.setitem( + linear_mod._POSSIBLE_NVFP4_KERNELS, + PlatformEnum.CUDA, + [B12xNvFp4LinearKernel, MarlinNvFp4LinearKernel], + ) monkeypatch.setattr( MarlinNvFp4LinearKernel, "is_supported",