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
cff5c2d2
Commit
cff5c2d2
authored
Nov 17, 2025
by
zhuwenwen
Browse files
add VLLM_USE_LIGHTOP_FILL_MOE_ALIN
parent
ed53dfb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
vllm/envs.py
vllm/envs.py
+5
-0
vllm/model_executor/layers/fused_moe/moe_align_block_size.py
vllm/model_executor/layers/fused_moe/moe_align_block_size.py
+3
-1
vllm/model_executor/model_loader/utils.py
vllm/model_executor/model_loader/utils.py
+2
-0
No files found.
vllm/envs.py
View file @
cff5c2d2
...
...
@@ -179,6 +179,7 @@ if TYPE_CHECKING:
VLLM_SCHED_ENABLE_MINIMAL_INJECTION
:
bool
=
False
VLLM_USE_PD_SPLIT
:
bool
=
False
VLLM_USE_PP_SYNC
:
bool
=
False
VLLM_USE_LIGHTOP_FILL_MOE_ALIN
:
bool
=
False
def
get_default_cache_root
():
return
os
.
getenv
(
...
...
@@ -1161,6 +1162,10 @@ environment_variables: dict[str, Callable[[], Any]] = {
"VLLM_USE_PP_SYNC"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_PP_SYNC"
,
"False"
).
lower
()
in
(
"true"
,
"1"
)),
# vLLM will use lightop to fuse fill and moe align
"VLLM_USE_LIGHTOP_FILL_MOE_ALIN"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_LIGHTOP_FILL_MOE_ALIN"
,
"False"
).
lower
()
in
(
"true"
,
"1"
)),
}
# --8<-- [end:env-vars-definition]
...
...
vllm/model_executor/layers/fused_moe/moe_align_block_size.py
View file @
cff5c2d2
...
...
@@ -216,7 +216,9 @@ def moe_align_block_size(
sorted_ids
=
torch
.
empty
((
max_num_tokens_padded
,
),
dtype
=
torch
.
int32
,
device
=
topk_ids
.
device
)
sorted_ids
.
fill_
(
topk_ids
.
numel
())
if
not
envs
.
VLLM_USE_LIGHTOP_FILL_MOE_ALIN
:
sorted_ids
.
fill_
(
topk_ids
.
numel
())
max_num_m_blocks
=
triton
.
cdiv
(
max_num_tokens_padded
,
block_size
)
# Expert ids must be zeroed out to prevent index out of bounds error while
# mapping global expert ids to local expert ids in expert parallelism.
...
...
vllm/model_executor/model_loader/utils.py
View file @
cff5c2d2
...
...
@@ -251,6 +251,8 @@ def get_model_architecture(
os
.
environ
[
'VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD'
]
=
'1'
if
not
envs
.
is_set
(
"VLLM_USE_OPT_CAT"
):
os
.
environ
[
'VLLM_USE_OPT_CAT'
]
=
'1'
if
not
envs
.
is_set
(
"VLLM_USE_LIGHTOP_FILL_MOE_ALIN"
):
os
.
environ
[
'VLLM_USE_LIGHTOP_FILL_MOE_ALIN'
]
=
'1'
if
os
.
getenv
(
'GEMM_PAD'
)
!=
'1'
:
os
.
environ
[
'GEMM_PAD'
]
=
'0'
...
...
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