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
3beadc2f
Unverified
Commit
3beadc2f
authored
Sep 12, 2025
by
Wentao Ye
Committed by
GitHub
Sep 12, 2025
Browse files
[Compilation Bug] Fix Inductor Graph Output with Shape Issue (#24772)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
bc636f21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vllm/model_executor/models/qwen3_moe.py
vllm/model_executor/models/qwen3_moe.py
+6
-3
No files found.
vllm/model_executor/models/qwen3_moe.py
View file @
3beadc2f
...
@@ -170,8 +170,9 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
...
@@ -170,8 +170,9 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
return
quant_config
return
quant_config
def
forward
(
self
,
hidden_states
:
torch
.
Tensor
)
->
torch
.
Tensor
:
def
forward
(
self
,
hidden_states
:
torch
.
Tensor
)
->
torch
.
Tensor
:
# NOTE: hidden_states can have either 1D or 2D shape.
assert
hidden_states
.
dim
(
orig_shape
=
hidden_states
.
shape
)
<=
2
,
"Qwen3MoeSparseMoeBlock only supports 1D or 2D inputs"
is_input_1d
=
hidden_states
.
dim
()
==
1
hidden_dim
=
hidden_states
.
shape
[
-
1
]
hidden_dim
=
hidden_states
.
shape
[
-
1
]
hidden_states
=
hidden_states
.
view
(
-
1
,
hidden_dim
)
hidden_states
=
hidden_states
.
view
(
-
1
,
hidden_dim
)
...
@@ -180,7 +181,9 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
...
@@ -180,7 +181,9 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
router_logits
=
router_logits
)
router_logits
=
router_logits
)
return
final_hidden_states
.
view
(
orig_shape
)
# return to 1d if input is 1d
return
final_hidden_states
.
squeeze
(
0
)
if
is_input_1d
else
\
final_hidden_states
class
Qwen3MoeAttention
(
nn
.
Module
):
class
Qwen3MoeAttention
(
nn
.
Module
):
...
...
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