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
c5ac5cf7
Commit
c5ac5cf7
authored
Jan 05, 2026
by
zhuwenwen
Browse files
back to forward_native
parent
424fa81f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vllm/model_executor/layers/activation.py
vllm/model_executor/layers/activation.py
+4
-4
No files found.
vllm/model_executor/layers/activation.py
View file @
c5ac5cf7
...
...
@@ -85,9 +85,9 @@ class SiluAndMul(CustomOp):
@
staticmethod
def
forward_native
(
x
:
torch
.
Tensor
)
->
torch
.
Tensor
:
"""PyTorch-native implementation equivalent to forward()."""
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
VLLM_USE_OPT_OP
:
return
self
.
forward_cuda
(
x
)
else
:
#
if not torch.compiler.is_compiling() and envs.VLLM_USE_OPT_OP:
#
return self.forward_cuda(x)
#
else:
d
=
x
.
shape
[
-
1
]
//
2
return
F
.
silu
(
x
[...,
:
d
])
*
x
[...,
d
:]
...
...
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