Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vllm/compilation/passes/fusion/allreduce_rms_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ def replacement(self):
def _replacement(
input: torch.Tensor, weight: torch.Tensor
) -> tuple[torch.Tensor, torch.Tensor]:
residual = torch.empty_like(input)
residual = torch.zeros_like(input)
allreduce = self.FUSED_AR_RMSNORM_OP(
input_=input,
residual=residual,
Expand Down
12 changes: 10 additions & 2 deletions vllm/model_executor/layers/layernorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,23 @@ def forward_native(
x,
self.weight.data if self.pass_weight else None,
self.variance_epsilon,
self.variance_size_override,
*(
Copy link
Copy Markdown
Collaborator

@ProExpertProg ProExpertProg May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just fix the patterns in the pass instead

(self.variance_size_override,)
if self.variance_size_override is not None
else ()
),
)
else:
return ir.ops.fused_add_rms_norm.maybe_inplace(
x,
residual,
self.weight.data if self.pass_weight_add else None,
self.variance_epsilon,
self.variance_size_override,
*(
(self.variance_size_override,)
if self.variance_size_override is not None
else ()
),
)

def forward_cuda(
Expand Down
Loading