Unit 5 of 10 · about 4 hours · measure
Auditing benchmarks: timing, baselines, parity and cherry-picking
Most reported speedups measure the baseline handicap, not the kernel merit. Parity first; speedup second.
You'll be able to
- Audit a GPU benchmark for timing, baseline, workload, correctness and cherry-picking flaws, and repair each with a named control.
- Establish baseline parity in precision, algorithm, compiler flags and allowed libraries before claiming any speedup.
- Apply the Appendix checklist as an audit list and record every deviation beside the number it affects.
Covers
Read
In this order, only the parts listed
0 of 3 done
- The Appendix checklist as an audit listAI Systems Performance Engineering - Chapters 2, 19 and 20 and the Appendix checklist
Appendix, AI Systems Performance Checklist: Performance Tuning and Cost Optimization Mindset; Reproducibility and Documentation Best Practices; Performance Profiling, Debugging, and Monitoring
- What an unaudited benchmark reportsKernelBench-Verified
Section 1 flaws: the FP32 baseline without the TF32 Tensor-Core path and the uniform positive-only tests; Section 2.2 TF32 baseline configuration; Section 3 headline results with the best model at 0.88x pooled across levels against 1.43x naive
- Milestone F audit and measurement requirementsGPU Microbenchmark and Kernel Suite - Final Evaluation
Milestone F: audit a deliberately misleading benchmark and correct every flaw; Measurement requirements: retain warmup and raw samples, report medians with variance, and explicitly label measured hardware
Focus on
- Parity means same precision, same algorithm, same flags, same libraries. At Level 2 of the Verified study, enabling TF32 in the baseline alone moved the best model from 1.67x to 0.88x, and the hidden suite took it to 0.85x.
- Uniform positive-only inputs hide sign, overflow and underflow paths. The audit adds negated, scaled-up and scaled-down distributions.
- Hidden distributions gate correctness only; speed is always timed on the original distribution. Mixing the two mixes coverage with performance.
- Keep the naive number beside the audited number. The gap between 1.43x and 0.88x is the finding, not an embarrassment.
Common mistakes · 3
- TF32 only changes precision, not rankings. It moved the headline from 1.43x to 0.88x with no model left above 1x.
- A passing test suite means correct. The old suite passed the ReLU identity shortcut at 374x; coverage across distributions decides, not trial count.
- Faster on the benchmark means faster in production. Shapes, values and hardware were fixed; held-out behavior is a separate claim with separate tests.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.A custom kernel reports 1.4x over a PyTorch FP32 baseline on matmul-heavy tasks. Name the first parity check and the expected effect.Answer
Enable the TF32 Tensor-Core path in the baseline with
torch.set_float32_matmul_precision('high'). The Verified study found TF32 alone accelerates such baselines over 1.5x on about a quarter of problems, which can erase the claimed speedup.2.Tests use only
torch.randinputs. Which three input variations does the hardened suite add, and what does each catch?AnswerScale by 3.0 to catch overflow, scale by 0.01 to catch underflow and near-zero paths, and negate to catch sign-dependent paths like the ReLU shortcut.
3.Why does the Verified protocol time only the original distribution?Answer
Hidden distributions are a correctness gate. Timing on them would mix numerical-path coverage with speed; any kernel failing one distribution is excluded from the aggregates instead.
4.Aggregate Correct Speedup is a geometric mean over correct kernels. Why geometric, and where do failed kernels go?Answer
Speedups are ratios, so the geometric mean keeps a 2x and a 0.5x symmetric where an arithmetic mean would not. Failed kernels leave the mean and count toward Correctness instead.
You're done when
You can run the five-line audit on an unfamiliar benchmark and name which parity fix moves its headline most.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 11 more in the section
- AI Systems Performance Engineering - Chapters 2, 19 and 20 and the Appendix checklistChris Fregly · primary
Read Chapter 2 for hardware generations, Chapters 19 and 20 on adaptive engine optimization and AI-assisted optimization, and use the Appendix checklist as an audit list for the final project. Treat every performance number as a hypothesis requiring your own evidence.
- GPU Microbenchmark and Kernel Suite - Final EvaluationRoadmap-Final · required
Complete Milestones C through F: CUDA and Triton kernel suite, failure injection, model-versus-profile reconciliation, strong baselines, real integration, full shape matrix, dispatch and fallback defense, clean reproduction and negative results.
- KernelBench-VerifiedKernelBench-Verified Authors · required
Study the evaluator hardening and baseline-parity failures found in the original benchmark. Run a very small task slice or port its adversarial testing ideas into the project evaluator; do not optimize for aggregate benchmark score.
Also in this section
- AI Performance Engineering - Hardware, Frontier and Source PolicyWafer · reference
A dated map of current hardware and frontier work. Apply its Source Policy to every final claim, and use the hardware and frontier sections only to find primary documentation.
- Performance Engineering and GPU Programming CheckpointRoadmap-Final · support
Use the checkpoint as the final adversarial assessment after the source-derived route. Pass the real kernel, compiler or communication modification and end-to-end evidence clauses; ignore its ordering where it conflicts with this track.
- SOL-ExecBenchNVIDIA · support
Inspect how correctness and performance are compared with a hardware speed-of-light model. Apply one attainable-efficiency analysis to a project kernel and explain missing hardware or model assumptions.
- MLPerf EndpointsMLCommons · support
Read the endpoint-level scenario and load-generation rules. Borrow the workload and result-boundary discipline for the integrated benchmark without claiming an official MLPerf result.
- CUDA Toolkit and Architecture Tuning GuidesNVIDIA · reference
Use the current toolkit root, release notes and the tuning guide matching the measured GPU. Pin the document and toolkit versions, verify capability checks and rerun any claim affected by compiler or architecture change.
- MIT 6.S894 Accelerated Computing (Fall 2025) - Lecture 10MIT · support
Use Lecture 10 (Accelerated Computing Beyond NVIDIA and CUDA) for AMD GPUs, TPUs, NPUs and higher-level kernel languages as portability vocabulary.
- Modern GPU Programming for MLSysMLC · depth
Use the Blackwell GEMM and Flash Attention path as a real architecture-specific reconstruction target if compatible hardware is available. Otherwise produce a static mechanism audit and leave all performance claims open.
- KernelBench - benchmark toolkit and task suiteScalingIntelligence · support
Clone the repository and check one Level 1 problem with
scripts/run_and_check.pyin local mode; readEVAL.mdfor the correctness and timing guidance. Do not chase the aggregate score. - Etalon - holistic evaluation for LLM inferenceGeorgia Tech, Microsoft Research India and Intel AI Lab · support
Read Section 2.2 for TTFT and TPOT pitfalls, then the fluidity-index design (Section 4.1) for deadline-based, SLO-qualified capacity.
- ROCm Composable KernelAMD · support
Read the repository
READMEfor the tile-based programming model, Tensor Coordinate Transformation and the four CK layers; open one tiled operator and map each CUDA term to its CK counterpart. - DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingZhong et al. (OSDI 2024) · support
Read Section 1 with Figure 1 for per-GPU goodput: the highest request rate served while a target share of requests meets the TTFT and TPOT SLOs.