perf: pure FP8 fwd/bwd and lean non-transposed GEMM

- drop the fused kernel; forward/backward are quantize + a pre-quantized GEMM
- rename module fp8_mm -> fp8_ops (mm.cu -> ops.cu)
- kernels/launchers fp8_gemm_kernel / launch_fp8_gemm; drop PqTraits/gather_trans/pack_fp8x4_vector
- remove the in-kernel transposed-operand branches (TransA/TransB)
- backward: quantize g once (amax_g here), explicit fp8 transposes, fast non-transposed GEMMs (dX = g@w^T, dW = g^T@x^T)
- each pass uses a single FP8 format (E4M3 fwd / E5M2 bwd)
This commit is contained in:
2026-08-23 15:38:30 +08:00
parent a29bdfae46
commit 4244df2785
8 changed files with 160 additions and 519 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ set(KERNEL_NAMES
attn_paged_decode
attn_paged_prefill
rotary_emb
fp8_mm
fp8_ops
)
set(KERNEL_SRCS
attention/decode.cu
@@ -66,7 +66,7 @@ set(KERNEL_SRCS
attention/paged_decode.cu
attention/paged_prefill.cu
rotary/rotary_emb.cu
fp8/mm.cu
fp8/ops.cu
)
list(LENGTH KERNEL_NAMES _kernel_count)