You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d05cb8c
Browse filesBrowse the repository at this point in the historyBrowse files
| End-to-end latency |**0.164 ms**| 0.295 ms | 0.252 ms |
895
-
| End-to-end TFLOPS |**13.18**| 7.29 | 8.54|
896
-
|**Croqtile speedup**|— |**1.81×**|**1.54×**|
891
+
| Metric | Croqtile | vLLM Triton|
892
+
|--------|:---:|:---:|
893
+
| GEMM-only latency | — | 0.218 ms |
894
+
| End-to-end latency |**0.164 ms**| 0.293 ms |
895
+
| End-to-end TFLOPS |**13.18**| 7.33|
896
+
|**Speedup**|**1.80×**|1.00×|
897
897
898
898
Both sides perform identical work: route (softmax + top-k) → quantize (BF16→FP8) → align/sort → grouped GEMM → scatter/reduce, with the same FLOPs formula `2 × (M × topk) × N × K = 2.147 GFLOP`.
899
899
900
-
vLLM ships no tuned Triton config for this shape (E=256, H800), so the "default" column uses its built-in fallback (`BLOCK_SIZE_M=64`). The "tuned" column uses the best config found by an 864-point grid search (`BLOCK_SIZE_M=16, N=64, K=128, GROUP_SIZE_M=4, num_warps=4, num_stages=3`), which cuts GEMM-only latency by 20%. Even with this tuned config, Croqtile's entire end-to-end pipeline (0.164 ms) still runs faster than vLLM's GEMM-only kernel (0.172 ms).
901
-
902
900
Two factors contribute to the gap: (1) Croqtile's WGMMA kernel with hand-tuned TMA pipelines is inherently faster than vLLM's Triton-generated GEMM for this shape, and (2) the fused pipeline stages (routing, quantization, scatter) overlap with the GEMM's memory access, adding near-zero additional latency — whereas in vLLM each stage is a separate kernel launch with its own overhead.
**Factor 1: A faster GEMM.** Even comparing GEMM-only, Croqtile's hand-tuned WGMMA kernel outperforms vLLM's Triton-generated kernel (the tuned vLLM GEMM-only takes 0.172 ms, while Croqtile's entire end-to-end pipeline takes 0.164 ms). This is a code quality advantage from Hopper-native TMA pipelines and register-level tuning that Triton's auto-tuner does not reach.
919
-
920
-
**Factor 2: Fused pipeline stages add near-zero overhead.** The scatter/reduce is compiled into the GEMM epilogue (no extra kernel), and the remaining pre-GEMM stages (route, count+build, quant+sort+gather) use `parallel.async` launches that overlap with each other and with the GEMM's memory loads. In vLLM, each of the 5 stages is a separate kernel with `cudaDeviceSynchronize` + Python dispatch + global memory write/read between every pair — at M=128, this per-kernel overhead dominates the total latency.
914
+
The Croqtile compiler fuses all these stages into **1–4 kernel launches**, eliminating inter-kernel launch overhead, Python dispatch latency, and intermediate global memory round-trips. At small batch sizes (M=128), this pipeline overhead dominates — which is exactly the regime where kernel fusion matters most.
921
915
922
916
!!! info "Fair-play note"
923
-
vLLM ships no tuned config for this shape (E=256 on H800). We ran an 864-config grid search to find the best Triton config — it improves GEMM-only by ~20%, but the end-to-end gap remains 1.54× because the pipeline overheadis structural and independent of GEMM tuning. Benchmark script: [`bench_vllm_single_gemm.py`](../assets/fused-moe-fp8/bench_vllm_single_gemm.py).
917
+
vLLM reports "Using default MoE config" for this shape (E=256 on H800). A tuned Triton autoconfig could narrow the GEMM-only gap. The pipeline overhead, however, is structural and independent of tuning. Benchmark script: [`bench_vllm_fused_moe.py`](../assets/fused-moe-fp8/bench_vllm_fused_moe.py).
924
918
925
919
### Reference: vLLM full MLP (different workload)
926
920
@@ -965,8 +959,6 @@ All `.co` milestone files are available for download from the links in the table
965
959
966
960
### Milestone `.co` Files
967
961
968
-
[⬇ Download all sources (ZIP)](../assets/fused-moe-fp8/fused-moe-fp8-sources.zip){ .md-button }
The script prints GEMM-only and end-to-end latencies with TFLOPS, matching the same FLOPs formula (`2 × M × topk × N × K`) used by the Croqtile benchmark.
990
+
See `README.md` in the same directory for full details.
0 commit comments