[CI][Test] Seed the DeepEP v2 MoE workers, not just the parent (#50589)
Signed-off-by: Guanxin Li <guanxinl@nvidia.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Guanxin Li committed
Aug 14, 2026 at 13:01 UTC
925ea7e60f727bbb3fe3fcdb1c02b01a5bfb2749
1 file changed
+5
tests/kernels/moe/test_deepep_v2_moe.py
+5
@@ -235,6 +235,10 @@ def _deep_ep_v2_moe(
235
w2_scale = w2_scale.to(device=device_idx)
236
237
pg = torch.distributed.new_group(list(range(pgi.world_size)))
238
+ # The caller's set_random_seed() only seeds the parent; spawn() gives each
239
+ # worker a fresh unseeded RNG, so seed here too or the inputs below differ
240
+ # every run. Offset by rank to keep the ranks' data distinct.
241
+ set_random_seed(7 + pgi.rank)
242
test_tensors = TestTensors.make(config)
243
244
with set_current_vllm_config(VllmConfig()):
@@ -373,6 +377,7 @@ def _deep_ep_v2_moe_cudagraph(
377
init_workspace_manager(device)
378
379
pg = torch.distributed.new_group(list(range(pgi.world_size)))
380
+ set_random_seed(7 + pgi.rank)
381
test_tensors = TestTensors.make(config)
382
num_local_experts = config.num_experts // pgi.world_size
383
hidden_size = config.k