fix: compute correct gs from data in fused SwiGLU test

This commit is contained in:
2026-06-02 08:20:27 +00:00
parent 4a05a40cf0
commit 2cfca36095

View File

@@ -64,8 +64,8 @@ def test_fused_swiglu_compilation():
# Create random weight (same for both paths)
w_bf16 = torch.randn(num_experts, K, N, dtype=torch.bfloat16, device=device) * 0.1
# Quantize activation using the proper pipeline
x_gs = 1.0 / (6.0 * 448.0) # placeholder gsa
# Quantize activation using proper pipeline
_, _, x_gs = quantize_to_nvfp4(x_bf16) # compute correct gs from data
x_fp4, x_sf = quantize_activation_nvfp4(x_bf16, x_gs)
# Quantize weight