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
0eaf8026
Commit
0eaf8026
authored
Nov 07, 2025
by
zhuwenwen
Browse files
replace triton_ of rms and act_and_mul
parent
a6088d09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
vllm/model_executor/layers/activation.py
vllm/model_executor/layers/activation.py
+3
-1
vllm/model_executor/layers/layernorm.py
vllm/model_executor/layers/layernorm.py
+4
-3
No files found.
vllm/model_executor/layers/activation.py
View file @
0eaf8026
...
...
@@ -75,7 +75,9 @@ class SiluAndMul(CustomOp):
def
forward_native
(
self
,
x
:
torch
.
Tensor
)
->
torch
.
Tensor
:
"""PyTorch-native implementation equivalent to forward()."""
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
VLLM_ENABLE_TBO
:
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
envs
.
VLLM_ENABLE_TBO
:
return
self
.
forward_cuda
(
x
)
elif
envs
.
VLLM_USE_OPT_OP
:
return
self
.
forward_cuda
(
x
)
else
:
d
=
x
.
shape
[
-
1
]
//
2
...
...
vllm/model_executor/layers/layernorm.py
View file @
0eaf8026
...
...
@@ -165,9 +165,10 @@ class RMSNorm(CustomOp):
x
:
torch
.
Tensor
,
residual
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
Union
[
torch
.
Tensor
,
tuple
[
torch
.
Tensor
,
torch
.
Tensor
]]:
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
VLLM_ENABLE_TBO
:
return
self
.
forward_cuda
(
x
,
residual
)
elif
envs
.
VLLM_USE_OPT_OP
:
return
self
.
forward_cuda
(
x
,
residual
)
else
:
orig_dtype
=
x
.
dtype
x
=
x
.
to
(
torch
.
float32
)
...
...
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