From 99115fcdcde9736d4097ea15e7bbab368c405edf Mon Sep 17 00:00:00 2001 From: Andreas Karatzas Date: Mon, 27 Jul 2026 16:29:08 -0500 Subject: [PATCH] [CI] Initialize DeepEP FP8 test weights (#49912) Signed-off-by: Andreas Karatzas --- tests/kernels/moe/test_deepep_moe.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/kernels/moe/test_deepep_moe.py b/tests/kernels/moe/test_deepep_moe.py index 8d12e2888d0..933718ef333 100644 --- a/tests/kernels/moe/test_deepep_moe.py +++ b/tests/kernels/moe/test_deepep_moe.py @@ -66,8 +66,14 @@ def make_weights( # per-out-channel weight quantization assert dtype == current_platform.fp8_dtype() - w1 = torch.empty((e, 2 * n, k), device="cuda", dtype=torch.float16) - w2 = torch.empty((e, k, n), device="cuda", dtype=torch.float16) + # Keep FP8 inputs finite and bounded. torch.empty made this test depend on + # allocator contents, while larger values exceed its fixed W8A8 tolerance. + w1 = torch.randn( + (e, 2 * n, k), device=current_platform.device_type, dtype=torch.float16 + ).div_(100) + w2 = torch.randn( + (e, k, n), device=current_platform.device_type, dtype=torch.float16 + ).div_(100) n_b_scales = 2 * n k_b_scales = k