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
e42a922c
"tests/vscode:/vscode.git/clone" did not exist on "722d46edb974315c7d2d8feed75520ea7a30d7fa"
Commit
e42a922c
authored
Oct 11, 2025
by
maxiao1
Browse files
change tbo about cudagrah
parent
394648be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
vllm/model_executor/layers/activation.py
vllm/model_executor/layers/activation.py
+2
-2
vllm/model_executor/layers/layernorm.py
vllm/model_executor/layers/layernorm.py
+2
-3
No files found.
vllm/model_executor/layers/activation.py
View file @
e42a922c
...
...
@@ -75,8 +75,8 @@ class SiluAndMul(CustomOp):
def
forward_native
(
self
,
x
:
torch
.
Tensor
)
->
torch
.
Tensor
:
"""PyTorch-native implementation equivalent to forward()."""
if
not
torch
.
compiler
.
is_compiling
()
:
# 非 capture 阶段
return
self
.
forward_cuda
(
x
)
# 强制走 fused kernel
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
VLLM_ENABLE_TBO
:
return
self
.
forward_cuda
(
x
)
else
:
d
=
x
.
shape
[
-
1
]
//
2
return
F
.
silu
(
x
[...,
:
d
])
*
x
[...,
d
:]
...
...
vllm/model_executor/layers/layernorm.py
View file @
e42a922c
...
...
@@ -166,10 +166,9 @@ class RMSNorm(CustomOp):
residual
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
Union
[
torch
.
Tensor
,
tuple
[
torch
.
Tensor
,
torch
.
Tensor
]]:
if
not
torch
.
compiler
.
is_compiling
()
:
# 非 capture 阶段
return
self
.
forward_cuda
(
x
,
residual
)
# 强制走 fused kernel
if
not
torch
.
compiler
.
is_compiling
()
and
envs
.
VLLM_ENABLE_TBO
:
return
self
.
forward_cuda
(
x
,
residual
)
else
:
# 否则fallback到原始实现
orig_dtype
=
x
.
dtype
x
=
x
.
to
(
torch
.
float32
)
if
residual
is
not
None
:
...
...
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