Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
0bcc195f
Unverified
Commit
0bcc195f
authored
Jul 27, 2025
by
Mick
Committed by
GitHub
Jul 27, 2025
Browse files
fix: minor fix TransportProxyTensor under tp (#8382)
parent
91e3d154
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
python/sglang/srt/managers/mm_utils.py
python/sglang/srt/managers/mm_utils.py
+2
-4
No files found.
python/sglang/srt/managers/mm_utils.py
View file @
0bcc195f
...
@@ -92,9 +92,7 @@ class TransportProxyTensor(torch.Tensor):
...
@@ -92,9 +92,7 @@ class TransportProxyTensor(torch.Tensor):
}
}
state
[
"tensor_data"
]
=
None
state
[
"tensor_data"
]
=
None
except
Exception
as
e
:
except
Exception
as
e
:
print_warning_once
(
# Failed to get CUDA IPC handle (possibly tp). Falling back to default transport.
f
"Warning: Failed to get CUDA IPC handle (
{
e
}
). Falling back to default transport."
)
state
[
"metadata"
][
"transport_mode"
]
=
"default"
state
[
"metadata"
][
"transport_mode"
]
=
"default"
state
[
"tensor_data"
]
=
self
.
as_subclass
(
torch
.
Tensor
)
state
[
"tensor_data"
]
=
self
.
as_subclass
(
torch
.
Tensor
)
else
:
else
:
...
@@ -751,7 +749,7 @@ def tensor_hash(tensor_list) -> int:
...
@@ -751,7 +749,7 @@ def tensor_hash(tensor_list) -> int:
]
]
tensor
=
torch
.
concat
(
tensor_list
)
tensor
=
torch
.
concat
(
tensor_list
)
if
tensor
.
is_cuda
:
if
tensor
.
is_cuda
:
return
gpu_tensor_hash
(
tensor
)
return
gpu_tensor_hash
(
tensor
.
cuda
()
)
tensor
=
tensor
.
detach
().
contiguous
()
tensor
=
tensor
.
detach
().
contiguous
()
if
tensor
.
dtype
==
torch
.
bfloat16
:
if
tensor
.
dtype
==
torch
.
bfloat16
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment