26 #ifndef TVM_IR_INSTRUMENT_H_
27 #define TVM_IR_INSTRUMENT_H_
29 #include <tvm/ffi/reflection/registry.h>
30 #include <tvm/ffi/string.h>
45 namespace instrument {
Managed reference class to IRModuleNode.
Definition: module.h:256
PassInstrumentNode forms an instrument implementation. It provides API for users to register callback...
Definition: instrument.h:103
virtual void ExitPassContext() const =0
Instrument when exiting PassContext. Called once within a PassContext.
virtual bool ShouldRun(const IRModule &mod, const transform::PassInfo &info) const =0
Determine whether to run the pass or not. Called multiple times depend on number of passes.
virtual void RunAfterPass(const IRModule &mod, const transform::PassInfo &info) const =0
Instrument after pass run. Called multiple time depend on number of passes.
virtual void RunBeforePass(const IRModule &mod, const transform::PassInfo &info) const =0
Instrument before pass run. Called multiple times depend on number of passes.
TVM_FFI_DECLARE_OBJECT_INFO("instrument.PassInstrument", PassInstrumentNode, Object)
virtual ~PassInstrumentNode()
Definition: instrument.h:108
virtual void EnterPassContext() const =0
Instrument when entering PassContext. Called once within a PassContext.
static void RegisterReflection()
Definition: instrument.h:140
ffi::String name
Name of this pass instrument object.
Definition: instrument.h:106
Managed reference class for PassInstrumentNode.
Definition: instrument.h:151
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(PassInstrument, ObjectRef, PassInstrumentNode)
Definition: repr_printer.h:91
IRModuleFrame IRModule()
The IRModule declaration statement.
Definition: module.h:249
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:308
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37
Definitions and helper macros for IR/AST nodes.