[Bugfix][V1][P/D]Fix the issue of occasional garbled output for P2pNcclConnector (#20263)

Signed-off-by: Abatom <abzhonghua@gmail.com>
This commit is contained in:
Zhonghua Deng
2025-06-30 16:45:14 -07:00
committed by GitHub
parent 97d9524fe9
commit ded1fb635b
@@ -310,6 +310,7 @@ class P2pNcclEngine:
elif data["cmd"] == "PUT": elif data["cmd"] == "PUT":
tensor_id = data["tensor_id"] tensor_id = data["tensor_id"]
try: try:
with torch.cuda.stream(self.recv_stream):
tensor = torch.empty(data["shape"], tensor = torch.empty(data["shape"],
dtype=getattr( dtype=getattr(
torch, data["dtype"]), torch, data["dtype"]),