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
5dc2dc0d
Commit
5dc2dc0d
authored
Sep 23, 2025
by
zhuwenwen
Browse files
Update layernorm.py
parent
50281e36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vllm/model_executor/layers/layernorm.py
vllm/model_executor/layers/layernorm.py
+4
-3
No files found.
vllm/model_executor/layers/layernorm.py
View file @
5dc2dc0d
...
@@ -253,7 +253,8 @@ class RMSNorm(CustomOp):
...
@@ -253,7 +253,8 @@ class RMSNorm(CustomOp):
return
self
.
rocm_norm_func_with_add
(
x
,
residual
,
self
.
weight
.
data
,
return
self
.
rocm_norm_func_with_add
(
x
,
residual
,
self
.
weight
.
data
,
self
.
variance_epsilon
)
self
.
variance_epsilon
)
else
:
else
:
return
norm_func
(
x
,
self
.
weight
.
data
,
self
.
variance_epsilon
)
return
self
.
rocm_norm_func
(
x
,
self
.
weight
.
data
,
self
.
variance_epsilon
)
def
forward_apex
(
def
forward_apex
(
self
,
self
,
...
@@ -265,7 +266,7 @@ class RMSNorm(CustomOp):
...
@@ -265,7 +266,7 @@ class RMSNorm(CustomOp):
norm_func
=
dispatch_cuda_rmsnorm_func
(
add_residual
)
norm_func
=
dispatch_cuda_rmsnorm_func
(
add_residual
)
if
add_residual
:
if
add_residual
:
return
norm_func
(
x
,
residual
,
self
.
weight
.
data
,
return
self
.
rocm_norm_func_with_add
(
x
,
residual
,
self
.
weight
.
data
,
self
.
variance_epsilon
)
self
.
variance_epsilon
)
else
:
else
:
return
fused_rms_norm_affine
(
x
,
self
.
weight
.
data
,
torch
.
Size
((
x
.
shape
[
-
1
],)),
self
.
variance_epsilon
)
return
fused_rms_norm_affine
(
x
,
self
.
weight
.
data
,
torch
.
Size
((
x
.
shape
[
-
1
],)),
self
.
variance_epsilon
)
...
...
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