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
c4336b2b
"vscode:/vscode.git/clone" did not exist on "517858adf5602db78d269e1f8317b9db307ac0b4"
Unverified
Commit
c4336b2b
authored
Nov 25, 2024
by
Lianmin Zheng
Committed by
GitHub
Nov 25, 2024
Browse files
Use custom allreduce w/ torch.compile (#2185)
parent
4d62bca5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
python/sglang/srt/model_executor/cuda_graph_runner.py
python/sglang/srt/model_executor/cuda_graph_runner.py
+2
-1
No files found.
python/sglang/srt/model_executor/cuda_graph_runner.py
View file @
c4336b2b
...
@@ -65,7 +65,8 @@ def patch_model(
...
@@ -65,7 +65,8 @@ def patch_model(
_to_torch
(
model
)
_to_torch
(
model
)
monkey_patch_vllm_all_gather
()
monkey_patch_vllm_all_gather
()
backup_ca_comm
=
tp_group
.
ca_comm
backup_ca_comm
=
tp_group
.
ca_comm
tp_group
.
ca_comm
=
None
# Use custom-allreduce here
# tp_group.ca_comm = None
yield
torch
.
compile
(
yield
torch
.
compile
(
torch
.
no_grad
()(
model
.
forward
),
mode
=
"max-autotune-no-cudagraphs"
torch
.
no_grad
()(
model
.
forward
),
mode
=
"max-autotune-no-cudagraphs"
)
)
...
...
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