Skip to content

Commit 0bcc195

Browse files
authored
fix: minor fix TransportProxyTensor under tp (sgl-project#8382)
1 parent 91e3d15 commit 0bcc195

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/sglang/srt/managers/mm_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def __getstate__(self):
9292
}
9393
state["tensor_data"] = None
9494
except Exception as e:
95-
print_warning_once(
96-
f"Warning: Failed to get CUDA IPC handle ({e}). Falling back to default transport."
97-
)
95+
# Failed to get CUDA IPC handle (possibly tp). Falling back to default transport.
9896
state["metadata"]["transport_mode"] = "default"
9997
state["tensor_data"] = self.as_subclass(torch.Tensor)
10098
else:
@@ -751,7 +749,7 @@ def tensor_hash(tensor_list) -> int:
751749
]
752750
tensor = torch.concat(tensor_list)
753751
if tensor.is_cuda:
754-
return gpu_tensor_hash(tensor)
752+
return gpu_tensor_hash(tensor.cuda())
755753
tensor = tensor.detach().contiguous()
756754

757755
if tensor.dtype == torch.bfloat16:

0 commit comments

Comments
 (0)