[Bugfix][XPU] Add MoTRMSNorm.forward_xpu delegating to forward_native (#5568)

Signed-off-by: Joshna Medisetty <joshna.medisetty@intel.com>
Signed-off-by: Joshna-Medisetty <joshna.medisetty@intel.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Joshna-MedisettyandCursor authored and GitHub committed 2026-09-02 23:06:17 -05:00
1 parent 48ae412a2f
commit 24c49cf392
7 files changed
+58 -41

No files matched your search

-18
View File
@@ -36,9 +36,6 @@ class LayerNorm(nn.LayerNorm, CustomOp):
def forward_hip(self, x: torch.Tensor) -> torch.Tensor:
return self.forward_native(x)
def forward_xpu(self, x: torch.Tensor) -> torch.Tensor:
return self.forward_native(x)
def forward_npu(self, x: torch.Tensor) -> torch.Tensor:
if _HAS_MINDIESD:
try:
@@ -151,15 +148,6 @@ class RMSNorm(CustomOp):
return output
def forward_xpu(
self,
x: torch.Tensor,
residual: torch.Tensor | None = None,
) -> torch.Tensor | tuple[torch.Tensor, torch.Tensor]:
if residual is None:
return self.forward_native(x)
return self.forward_native(x, residual)
def forward_native(
self,
x: torch.Tensor,
@@ -231,12 +219,6 @@ class RMSNormVAE(CustomOp):
out = out + self.bias
return out
def forward_xpu(
self,
x: torch.Tensor,
) -> torch.Tensor:
return self.forward_native(x)
def forward_native(
self,
x: torch.Tensor,