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
afa5b7ca
Unverified
Commit
afa5b7ca
authored
Aug 10, 2025
by
Zhewen Li
Committed by
GitHub
Aug 10, 2025
Browse files
[Misc][gpt-oss] guard import when triton kernel when not up to date (#22584)
Signed-off-by:
zhewenli
<
zhewenli@meta.com
>
parent
1b990280
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py
...l_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py
+12
-3
No files found.
vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py
View file @
afa5b7ca
...
...
@@ -5,15 +5,24 @@ from typing import TYPE_CHECKING, Any, Optional
import
torch
import
vllm.model_executor.layers.fused_moe.modular_kernel
as
mk
from
vllm.logger
import
init_logger
from
vllm.model_executor.layers.fused_moe.topk_weight_and_reduce
import
(
TopKWeightAndReduceDelegate
)
from
vllm.model_executor.layers.fused_moe.utils
import
extract_required_args
from
vllm.utils
import
has_triton_kernels
logger
=
init_logger
(
__name__
)
if
has_triton_kernels
():
try
:
import
triton_kernels.swiglu
from
triton_kernels.matmul_ogs
import
FnSpecs
,
FusedActivation
,
matmul_ogs
from
triton_kernels.matmul_ogs
import
(
FnSpecs
,
FusedActivation
,
matmul_ogs
)
from
triton_kernels.routing
import
routing
except
ModuleNotFoundError
:
logger
.
error
(
"Failed to import Triton kernels. Please make sure your triton "
"version is compatible."
)
if
TYPE_CHECKING
:
from
triton_kernels.matmul_ogs
import
PrecisionConfig
...
...
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