[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user