Skip to content

Performance Tuning

Performance tuning guide for the Mini-Inference Engine.

Key Metrics

  1. GFLOPS: FLOPs / (time_ms * 1e6)
  2. Memory Bandwidth Utilization: Actual / Peak bandwidth
  3. Arithmetic Intensity: FLOPs / Bytes

Block Size Selection

ParameterDescriptionTypical
BMBlock M dimension64-256
BNBlock N dimension64-256
BKIteration K dimension8-32
TMThread M dimension4-8
TNThread N dimension4-8

Architecture-Specific Tips

  • Volta (SM 7.0): BM=128, BN=128
  • Turing (SM 7.5): Consider FP16
  • Ampere (SM 8.0): Use cp.async
  • Ada (SM 8.9): Maximize compute density

Profiling Tools

bash
cd build/default/bin
nsys profile -o report ./mini_inference_benchmark
ncu --set full -o report ./mini_inference_benchmark

References

Released under the MIT License.