AI-Based Hardware Performance Predictor
Exploring how compute capacity, memory bandwidth, and workload shape set the limits of an AI kernel.
- AI Hardware
- Performance
- Roofline
- Memory
Finding the limiting resource
A GPU's peak arithmetic throughput tells only part of the performance story. A kernel also needs to move its inputs, weights, and outputs through memory. Depending on its shape and data reuse, the same workload can encounter very different limits on different hardware.
Ahmed Hatem Salem's Roofline Bottleneck Explorer turns that relationship into an interactive workflow. It combines analytical estimates, a machine-learning bottleneck classifier, what-if comparisons, and optimization suggestions. A separate command-line model extends the study to measured kernel timings.
From a workload to a performance bound
The user selects a hardware preset or enters compute throughput, memory bandwidth, cache size, compute-unit count, and memory capacity. A workload description supplies dimensions, precision, operation counts, and estimated data movement.
The Roofline calculation connects three quantities:
- Arithmetic intensity: the number of floating-point operations per byte transferred.
- Ridge point: peak compute throughput divided by memory bandwidth.
- Ideal runtime: the larger of the compute-side and memory-side ideal times.
The resulting ceiling helps identify a compute-bound or memory-bound case. Actual runtime also depends on utilization, launch overhead, cache behavior, and kernel implementation. The explorer treats the analytical result as a bound under its assumptions.
Try the explorer
The live Streamlit app runs without a GPU. Its workload options include matrix multiplication, convolution, attention-score computation, normalization, elementwise operations, reductions, gather, and custom FLOP/byte inputs.
After an analysis, the interface shows the analytical and learned verdicts, a Roofline plot, structural diagnostics, and class probabilities. What-if scenarios recompute the estimates after changes such as doubling bandwidth or compute, increasing cache, changing precision, or adjusting batch size where applicable.
A rule-based advisor ranks candidate changes using idealized bounds. These suggestions help prioritize profiling experiments; the displayed gains are not measured speedups. The recorded demo and presentation provide a walkthrough of the workflow.
Two learning paths with different evidence
The browser app uses a histogram gradient-boosting classifier trained on the project's simulated labels. It predicts memory-bound, mixed, or compute-bound behavior. The simulator includes assumptions about reuse, tile traffic, utilization, access patterns, and noise. Classifier accuracy on that data measures how well the model learns those assumptions.
The separate timing model uses 452,120 measured kernel records across 11 NVIDIA GPUs from the PipeWeave dataset, as described in the technical report. It learns the ratio between measured runtime and the Roofline ideal, using quantile regression to estimate a median time and an interval. This measured-data model is available through the command line and is not connected to the browser app.
How well does the timing model transfer?
The report compares held-out problem shapes, GPUs, and whole architecture families. Its reported relative timing-error summaries rise as the hardware differs more from training:
The evaluation script summarizes timing error by averaging fold-level median relative errors, weighted by test-fold size. These reported figures describe three separate cross-validation settings.
Uncertainty transfers less reliably than the point estimate. The nominal 80% intervals cover approximately 79% of held-out-shape timings, 45% of held-out-GPU timings, and 27% of held-out-architecture timings. Predictions on unfamiliar hardware therefore need particular care.
The learned model's advantage also varies by operator. In the unseen-architecture comparison, a constant-efficiency baseline performs better for BF16 matrix multiplication. The study supports comparisons within its measured scope rather than a universal advantage for machine learning.
Scope and further work
The project focuses on individual GPU kernels. Hardware presets are approximate, the bottleneck classifier uses simulation, and the real-data study covers a limited set of GPUs and operators. The Nsight measurement harness is implemented, but the report records no hardware runs of that harness.
Further work includes collecting profiler-counter labels, connecting the measured-data model to the interface, checking hardware specifications, expanding operator and consumer-GPU coverage, and improving prediction intervals. The report also identifies assumptions in attention FLOP counts that affect efficiency estimates.
Explore the project
Browse the source code, try the live demo, or watch the recorded demonstration. The technical report explains the methods and evaluation, while the presentation walks through the application and its architecture.