Skip to content

benchmarks.SaturnNPU.scripts.extract_all_kernel_variants

Source: benchmarks/SaturnNPU/scripts/extract_all_kernel_variants.py

benchmarks.SaturnNPU.scripts.extract_all_kernel_variants

Extract ALL kernel shape variants + fused patterns from global-opt MLIR.

Uses MLIR Python bindings to walk the IR and write standalone .mlir files for every shape variant of every kernel type, with fully resolved affine maps.

Also identifies fusible composite patterns and writes them as separate kernels.