Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
fa322078
Unverified
Commit
fa322078
authored
Apr 29, 2024
by
Woosuk Kwon
Committed by
GitHub
Apr 29, 2024
Browse files
[Bugfix][Kernel] Fix compute_type for MoE kernel (#4463)
parent
d627a3d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vllm/model_executor/layers/fused_moe/fused_moe.py
vllm/model_executor/layers/fused_moe/fused_moe.py
+4
-2
No files found.
vllm/model_executor/layers/fused_moe/fused_moe.py
View file @
fa322078
...
...
@@ -433,6 +433,8 @@ def fused_moe(
sorted_token_ids
,
expert_ids
,
num_tokens_post_padded
=
moe_align_block_size
(
topk_ids
,
config
[
'BLOCK_SIZE_M'
],
E
)
compute_type
=
(
tl
.
bfloat16
if
hidden_states
.
dtype
==
torch
.
bfloat16
else
tl
.
float16
)
invoke_fused_moe_kernel
(
hidden_states
,
w1
,
...
...
@@ -447,7 +449,7 @@ def fused_moe(
False
,
topk_ids
.
shape
[
1
],
config
,
compute_type
=
tl
.
float16
,
compute_type
=
compute_type
,
use_fp8
=
use_fp8
)
ops
.
silu_and_mul
(
intermediate_cache2
,
intermediate_cache1
.
view
(
-
1
,
N
))
...
...
@@ -465,7 +467,7 @@ def fused_moe(
True
,
1
,
config
,
compute_type
=
tl
.
float16
,
compute_type
=
compute_type
,
use_fp8
=
use_fp8
)
if
inplace
:
...
...
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