[ROCm][CI] Extended Fused MoE and FP8 MoE test support (#41100)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
This commit is contained in:
Andreas Karatzas
2026-08-19 10:19:42 -05:00
committed by GitHub
parent be06873198
commit 160f7f0840
9 changed files with 331 additions and 31 deletions
@@ -313,7 +313,7 @@ def break_fp4_bytes(a, dtype):
signs = (combined & 0x08).to(torch.bool) # Sign bits
abs_vals = (combined & 0x07).to(torch.long)
kE2M1 = kE2M1ToFloat_handle.val
kE2M1 = kE2M1ToFloat_handle.val.to(device=a.device)
# Device-aware lookup and sign application
values = kE2M1[abs_vals] * torch.where(signs, -1.0, 1.0)
# Reshape to final form