Skip to content

benchmarks.SaturnNPU.scripts.plot_npu_coverage

Source: benchmarks/SaturnNPU/scripts/plot_npu_coverage.py

benchmarks.SaturnNPU.scripts.plot_npu_coverage

Generate useful plots for SmolVLA NPU kernel decomposition.

Only generates plots that are actually informative
  1. Pareto coverage — which kernels to implement first
  2. Per-PyTorch-layer op decomposition — what each layer becomes
  3. Cross-level flow diagram — how ops transform through compilation
Usage

python scripts/plot_npu_coverage.py benchmarks/SaturnNPU/smolvla_graph_manifest.json --layer-trace benchmarks/SaturnNPU/layer_decomposition.json --output-dir benchmarks/SaturnNPU/plots/

plot_cross_level_flow(manifest, output_dir)

Flow diagram: PyTorch ops -> Linalg/Input -> Global-Opt.

plot_layer_decomposition(trace_data, output_dir)

Stacked bar: what ops each PyTorch layer type decomposes into.

plot_pareto(manifest, output_dir)

Which kernels to implement first by FLOP impact.