From 7b203b76947de241659d0f1a8b77183bc48a6dd2 Mon Sep 17 00:00:00 2001 From: youkaichao Date: Wed, 19 Feb 2025 01:37:11 +0800 Subject: [PATCH] [misc] fix debugging code (#13487) Signed-off-by: youkaichao --- docs/source/getting_started/troubleshooting.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/getting_started/troubleshooting.md b/docs/source/getting_started/troubleshooting.md index 2f41fa3b6b19e..92103e65bbbb7 100644 --- a/docs/source/getting_started/troubleshooting.md +++ b/docs/source/getting_started/troubleshooting.md @@ -94,20 +94,20 @@ pynccl.disabled = False s = torch.cuda.Stream() with torch.cuda.stream(s): data.fill_(1) - pynccl.all_reduce(data, stream=s) - value = data.mean().item() + out = pynccl.all_reduce(data, stream=s) + value = out.mean().item() assert value == world_size, f"Expected {world_size}, got {value}" print("vLLM NCCL is successful!") g = torch.cuda.CUDAGraph() with torch.cuda.graph(cuda_graph=g, stream=s): - pynccl.all_reduce(data, stream=torch.cuda.current_stream()) + out = pynccl.all_reduce(data, stream=torch.cuda.current_stream()) data.fill_(1) g.replay() torch.cuda.current_stream().synchronize() -value = data.mean().item() +value = out.mean().item() assert value == world_size, f"Expected {world_size}, got {value}" print("vLLM NCCL with cuda graph is successful!")