tvm
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
tvm::meta_schedule::MutatorNode Class Referenceabstract

Mutator is designed to mutate the trace to explore the design space. More...

#include <mutator.h>

Inheritance diagram for tvm::meta_schedule::MutatorNode:
Collaboration diagram for tvm::meta_schedule::MutatorNode:

Public Member Functions

virtual ~MutatorNode ()=default
 Virtual destructor. More...
 
virtual void InitializeWithTuneContext (const TuneContext &context)=0
 Initialize the design space generator with tuning context. More...
 
virtual Optional< tir::TraceApply (const tir::Trace &trace, support::LinearCongruentialEngine::TRandState *rand_state)=0
 Apply the mutator function to the given trace. More...
 
virtual Mutator Clone () const =0
 Clone the mutator. More...
 
 TVM_DECLARE_BASE_OBJECT_INFO (MutatorNode, Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Static Public Attributes

static constexpr const char * _type_key = "meta_schedule.Mutator"
 

Detailed Description

Mutator is designed to mutate the trace to explore the design space.

Constructor & Destructor Documentation

◆ ~MutatorNode()

virtual tvm::meta_schedule::MutatorNode::~MutatorNode ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ Apply()

virtual Optional<tir::Trace> tvm::meta_schedule::MutatorNode::Apply ( const tir::Trace trace,
support::LinearCongruentialEngine::TRandState rand_state 
)
pure virtual

Apply the mutator function to the given trace.

Parameters
traceThe given trace for mutation.
rand_stateThe random state for mutation.
Returns
None if mutator failed, otherwise return the mutated trace.

Implemented in tvm::meta_schedule::PyMutatorNode.

◆ Clone()

virtual Mutator tvm::meta_schedule::MutatorNode::Clone ( ) const
pure virtual

Clone the mutator.

Returns
The cloned mutator.

Implemented in tvm::meta_schedule::PyMutatorNode.

◆ InitializeWithTuneContext()

virtual void tvm::meta_schedule::MutatorNode::InitializeWithTuneContext ( const TuneContext context)
pure virtual

Initialize the design space generator with tuning context.

Parameters
contextThe tuning context for initialization.
Note
This method is supposed to be called only once before every other method.

Implemented in tvm::meta_schedule::PyMutatorNode.

◆ RegisterReflection()

static void tvm::meta_schedule::MutatorNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_BASE_OBJECT_INFO()

tvm::meta_schedule::MutatorNode::TVM_DECLARE_BASE_OBJECT_INFO ( MutatorNode  ,
Object   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::meta_schedule::MutatorNode::_type_key = "meta_schedule.Mutator"
staticconstexpr

The documentation for this class was generated from the following file: