Expand description
Pass instrumentation.
Laid out like python/tvm_tirx/ir/transform/instrument.py. A BasePassInstrument is a
PassInstrument whose hooks are callbacks: the object that pass_instrument (in
ir/transform/core.py) creates for an instrument written in Python, and that
BasePassInstrument::new creates from Rust closures.
Structs§
- Opaque: no metadata of its own: total_size is unknown. Fields are read through the C ABI getters.
- The hooks of a
BasePassInstrument; a hook leftNonedoes nothing, and a missingshould_runlets every pass run.
Functions§
- An instrument that times the passes, for
render_pass_timing: Python’sPassTimingInstrument()(transform.instrument.MakePassTimingInstrument). - The pass times a
pass_timing_instrumentrecorded in the current pass context: Python’sPassTimingInstrument.render()(transform.instrument.RenderTimePassProfiles).
Type Aliases§
- A hook called when a pass context is entered or exited.
- A hook called with a module and the pass to run on it;
Send + Synclike aPassContextHook.