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
405780bc
Unverified
Commit
405780bc
authored
Jun 17, 2025
by
kk
Committed by
GitHub
Jun 16, 2025
Browse files
[amd] Opt dsv3 moe (#7160)
Co-authored-by:
wunhuang
<
wunhuang@amd.com
>
parent
1dffee31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
python/sglang/srt/layers/quantization/fp8.py
python/sglang/srt/layers/quantization/fp8.py
+10
-8
No files found.
python/sglang/srt/layers/quantization/fp8.py
View file @
405780bc
...
...
@@ -82,6 +82,7 @@ _use_aiter = get_bool_env_var("SGLANG_USE_AITER") and _is_hip
if
_is_hip
:
from
aiter
import
ActivationType
,
QuantType
from
aiter.fused_moe
import
fused_moe
from
aiter.fused_moe_bf16_asm
import
asm_moe
,
ck_moe_2stages
from
aiter.ops.shuffle
import
shuffle_weight
...
...
@@ -1062,19 +1063,20 @@ class Fp8MoEMethod:
if
_use_aiter
:
assert
not
no_combine
,
f
"
{
no_combine
=
}
is not supported."
if
self
.
block_quant
:
# TODO(_use_aiter): FP8 block_quant only supports 'silu' for the time-being.
assert
(
activation
==
"silu"
),
f
"_use_aiter: FP8 bloack_quant
{
activation
=
}
will be supported later, unset _use_aiter"
return
asm_moe
(
return
fused_moe
(
x
,
layer
.
w13_weight
,
layer
.
w2_weight
,
topk_weights
,
topk_ids
,
layer
.
w13_weight_scale_inv
,
layer
.
w2_weight_scale_inv
,
block_shape
=
tuple
(
self
.
quant_config
.
weight_block_size
),
w1_scale
=
layer
.
w13_weight_scale_inv
,
w2_scale
=
layer
.
w2_weight_scale_inv
,
quant_type
=
QuantType
.
per_128x128
,
activation
=
(
ActivationType
.
Silu
if
activation
==
"silu"
else
ActivationType
.
Gelu
),
expert_mask
=
None
,
)
else
:
...
...
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