fix: w_gs is scalar not iterable

This commit is contained in:
2026-06-02 08:22:29 +00:00
parent b0c71b947e
commit ae4506d722

View File

@@ -86,8 +86,7 @@ def test_fused_swiglu_compilation():
scale_b = assemble_scales_3d_side(w_sf)
gsa = torch.full((num_experts,), x_gs, dtype=torch.float32, device=device)
gsb_vals = [float(g) for g in w_gs] # convert to Python floats
gsb = torch.tensor(gsb_vals, dtype=torch.float32, device=device)
gsb = torch.full((num_experts,), w_gs, dtype=torch.float32, device=device) # same gs for all experts
# Pad activation
x_padded = torch.zeros(128, K_packed, dtype=torch.uint8, device=device).view(torch.float4_e2m1fn_x2)