FlashInfer-Bench Dataset
Download the FlashInfer-Bench dataset.
Benchmarking
Via CLI
Run benchmarks on a local trace dataset:Custom Options
Via Python API
Tracing and Apply Overview
FlashInfer-Bench provides two key capabilities:- Tracing: Automatically capture workload from your FlashInfer calls
- Apply: Automatically substitute optimized custom kernels for FlashInfer operations
Basic Usage with Apply
The simplest way to use FlashInfer-Bench is through environment variables. Once you’ve installed FlashInfer-Bench, you can enable tracing and apply by:- Import
flashinfer_bench
before importing FlashInfer - Set environment variables to control behavior
Example: Drop-in Optimization
Environment Variables
Control FlashInfer-Bench behavior with these environment variables:FIB_ENABLE_TRACING=1
: Enable workload tracing to collect performance dataFIB_ENABLE_APPLY=1
: Enable automatic kernel substitutionFIB_DATASET_PATH=/path/to/dataset
: Specify where trace data and custom kernels are stored (default:~/.cache/flashinfer_bench/dataset
)