A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
fix(tests): Ensure reliable CUDA cache clearing in MoE test (#23416)
Signed-off-by: AzizCode92 <azizbenothman76@gmail.com> Signed-off-by: Michael Goin <mgoin64@gmail.com> Co-authored-by: Michael Goin <mgoin64@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Aziz committed
Aug 22, 2025 at 19:20 UTC
341923b9820ea1dc437445e2e81644e6ba47e5b6
1 file changed
+1
-1
tests/kernels/moe/test_moe.py
+1
-1
@@ -429,11 +429,11 @@ def test_mixtral_moe(dtype: torch.dtype, padding: bool, use_rocm_aiter: bool,
429
vllm_moe.experts.w13_weight, (0, 128), "constant", 0)[...,
430
0:-128],
431
requires_grad=False)
432
- torch.cuda.empty_cache()
432
vllm_moe.experts.w2_weight = Parameter(F.pad(
433
vllm_moe.experts.w2_weight, (0, 128), "constant", 0)[...,
434
0:-128],
435
requires_grad=False)
436
+ torch.cuda.synchronize()
437
torch.cuda.empty_cache()
438
439
# Run forward passes for both MoE blocks