Skip to content

Commit 341923b

Browse files
AzizCode92mgoingemini-code-assist[bot]
authored
fix(tests): Ensure reliable CUDA cache clearing in MoE test (#23416)
Signed-off-by: AzizCode92 <[email protected]> Signed-off-by: Michael Goin <[email protected]> Co-authored-by: Michael Goin <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 424fb7a commit 341923b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/kernels/moe/test_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,11 @@ def test_mixtral_moe(dtype: torch.dtype, padding: bool, use_rocm_aiter: bool,
429429
vllm_moe.experts.w13_weight, (0, 128), "constant", 0)[...,
430430
0:-128],
431431
requires_grad=False)
432-
torch.cuda.empty_cache()
433432
vllm_moe.experts.w2_weight = Parameter(F.pad(
434433
vllm_moe.experts.w2_weight, (0, 128), "constant", 0)[...,
435434
0:-128],
436435
requires_grad=False)
436+
torch.cuda.synchronize()
437437
torch.cuda.empty_cache()
438438

439439
# Run forward passes for both MoE blocks

0 commit comments

Comments
 (0)