lowering_stats#
- lowering_stats()#
Return a snapshot of rewrite counters since the last reset.
Keys are
"rewritten"plus one"skipped:<reason>"entry per rejection cause (e.g."skipped:spatial-too-large"). A pass that silently does nothing is hard to debug; this is how you tell “did not match” from “matched but rejected”, and why.Note
Counters only advance when the pass actually runs. Inductor caches compiled artifacts on disk, and a cache hit skips every pre-grad pass — so empty counters can mean “served from cache” rather than “did not fire”. Set
torch._inductor.config.force_disable_caches = Truewhen using this to verify behaviour.