tvm_tirx.ir.transform.instrument.PassTimingInstrument#
- class tvm_tirx.ir.transform.instrument.PassTimingInstrument#
Bases:
PassInstrumentMeasure time spent in passes without changing their IR.
Install in
PassContext(instruments=[PassTimingInstrument()])and callrender()inside that context to read the accumulated profile.- static render()#
Retrieve the rendered pass timing profile.
- Returns:
string (string) – The rendered string result of time profiles
Examples
timing_inst = PassTimingInstrument() with tvm_tirx.ir.transform.PassContext(instruments=[timing_inst]): mod = tvm_tirx.tirx.transform.StmtSimplify()(mod) # before exiting the context, get profile results. profiles = timing_inst.render()