[EPLB][ROCm]: support EPBL for ROCm backend (#27731)

Signed-off-by: Perry Zhang <perzhang@amd.com>
Co-authored-by: Perry Zhang <perzhang@amd.com>
This commit is contained in:
PerryZhang01
2025-11-12 18:16:35 +00:00
committed by GitHub
co-authored by Perry Zhang
parent bac904565f
commit a1e7fa362a
4 changed files with 23 additions and 6 deletions
@@ -1218,7 +1218,11 @@ class FusedMoE(CustomOp):
def get_expert_weights(self) -> Iterable[torch.Tensor]:
weights = list(self.named_parameters())
assert all(weight.is_contiguous() for _, weight in weights)
assert all(
weight.is_contiguous()
for name, weight in weights
if not name.startswith("_shared_experts.")
)
# Filter out the non-expert weights.
# `e_score_correction_bias` is a bias for each logical expert,