26 #ifndef TVM_IR_INSTRUMENT_H_
27 #define TVM_IR_INSTRUMENT_H_
44 namespace instrument {
141 static constexpr
const char*
_type_key =
"instrument.PassInstrument";
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
Managed reference class to IRModuleNode.
Definition: module.h:366
PassInstrumentNode forms an instrument implementation. It provides API for users to register callback...
Definition: instrument.h:102
virtual void ExitPassContext() const =0
Instrument when exiting PassContext. Called once within a PassContext.
static constexpr const char * _type_key
Definition: instrument.h:141
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.
virtual ~PassInstrumentNode()
Definition: instrument.h:107
void VisitAttrs(AttrVisitor *v)
Definition: instrument.h:139
virtual void EnterPassContext() const =0
Instrument when entering PassContext. Called once within a PassContext.
String name
Name of this pass instrument object.
Definition: instrument.h:105
TVM_DECLARE_BASE_OBJECT_INFO(PassInstrumentNode, Object)
Managed reference class for PassInstrumentNode.
Definition: instrument.h:149
TVM_DEFINE_OBJECT_REF_METHODS(PassInstrument, ObjectRef, PassInstrumentNode)
Base class of all object reference.
Definition: object.h:519
base class of all object containers.
Definition: object.h:171
Reference to string objects.
Definition: string.h:98
IRModuleFrame IRModule()
The IRModule declaration statement.
Definition: module.h:359
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:290
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Reflection and serialization of compiler IR/AST nodes.
Runtime String container types.