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
fa271613
Unverified
Commit
fa271613
authored
Nov 24, 2024
by
Yineng Zhang
Committed by
GitHub
Nov 24, 2024
Browse files
fix: use torch.sum for compatible (#2161)
parent
5652c565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
python/sglang/srt/layers/triton_fused_moe/fused_moe.py
python/sglang/srt/layers/triton_fused_moe/fused_moe.py
+3
-2
No files found.
python/sglang/srt/layers/triton_fused_moe/fused_moe.py
View file @
fa271613
...
@@ -766,9 +766,10 @@ def fused_experts_impl(
...
@@ -766,9 +766,10 @@ def fused_experts_impl(
use_int8_w8a16
=
use_int8_w8a16
,
use_int8_w8a16
=
use_int8_w8a16
,
)
)
ops
.
moe_
sum
(
torch
.
sum
(
intermediate_cache3
.
view
(
*
intermediate_cache3
.
shape
),
intermediate_cache3
.
view
(
*
intermediate_cache3
.
shape
),
out_hidden_states
[
begin_chunk_idx
:
end_chunk_idx
],
dim
=
1
,
out
=
out_hidden_states
[
begin_chunk_idx
:
end_chunk_idx
],
)
)
return
out_hidden_states
return
out_hidden_states
...
...
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