tvm.transform.instrument#
Concrete tools for inspecting and timing IR transformations.
- class tvm.transform.instrument.PassTimingInstrument#
A wrapper to create a passes time instrument that implemented in C++
- static render()#
Retrieve rendered time profile result :returns: string – The rendered string result of time profiles :rtype: string
Examples
timing_inst = PassTimingInstrument() with tvm.transform.PassContext(instruments=[timing_inst]): relax_mod = relax.transform.FuseOps()(relax_mod) # before exiting the context, get profile results. profiles = timing_inst.render()
- class tvm.transform.instrument.PassPrintingInstrument(print_before_pass_names, print_after_pass_names)#
A pass instrument to print if before or print ir after each element of a named pass.
- class tvm.transform.instrument.PrintAfterAll(*args, **kwargs)#
Print the name of the pass, the IR, only after passes execute.
- class tvm.transform.instrument.PrintBeforeAll(*args, **kwargs)#
Print the name of the pass, the IR, only before passes execute.