tvm
Public Types | Public Member Functions | Static Public Member Functions | List of all members
tvm::meta_schedule::Mutator Class Reference

Managed reference to MutatorNode. More...

#include <mutator.h>

Inheritance diagram for tvm::meta_schedule::Mutator:
Collaboration diagram for tvm::meta_schedule::Mutator:

Public Types

using FInitializeWithTuneContext = runtime::TypedPackedFunc< void(const TuneContext &)>
 The function type of InitializeWithTuneContext method. More...
 
using FApply = runtime::TypedPackedFunc< Optional< tir::Trace >(const tir::Trace &, support::LinearCongruentialEngine::TRandState rand_state)>
 Apply the mutator function to the given trace. More...
 
using FClone = runtime::TypedPackedFunc< Mutator()>
 Clone the mutator. More...
 
using FAsString = runtime::TypedPackedFunc< String()>
 Get the mutator as string with name. More...
 
- Public Types inherited from tvm::runtime::ObjectRef
using ContainerType = Object
 type indicate the container type. More...
 

Public Member Functions

 TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS (Mutator, ObjectRef, MutatorNode)
 
- Public Member Functions inherited from tvm::runtime::ObjectRef
 ObjectRef ()=default
 default constructor More...
 
 ObjectRef (ObjectPtr< Object > data)
 Constructor from existing object ptr. More...
 
bool same_as (const ObjectRef &other) const
 Comparator. More...
 
bool operator== (const ObjectRef &other) const
 Comparator. More...
 
bool operator!= (const ObjectRef &other) const
 Comparator. More...
 
bool operator< (const ObjectRef &other) const
 Comparator. More...
 
bool defined () const
 
const Objectget () const
 
const Objectoperator-> () const
 
bool unique () const
 
int use_count () const
 
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>>
const ObjectType * as () const
 Try to downcast the internal Object to a raw pointer of a corresponding type. More...
 
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>>
Optional< ObjectRefType > as () const
 Try to downcast the ObjectRef to a Optional<T> of the requested type. More...
 

Static Public Member Functions

static Mutator MutateTileSize ()
 Create a Mutator that mutates the decision of instruction Sample-Perfect-Tile. More...
 
static Mutator MutateParallel (int64_t max_jobs_per_core)
 Create a Mutator that mutates the parallel extent. More...
 
static Mutator MutateUnroll ()
 Create a Mutator that mutates auto unroll step. More...
 
static Mutator MutateComputeLocation ()
 Create a Mutator that mutates the outcome of SampleComputeLocation. More...
 
static Mutator MutateThreadBinding ()
 Create a Mutator that mutates auto thread binding. More...
 
static Mutator PyMutator (FInitializeWithTuneContext f_initialize_with_tune_context, FApply f_apply, FClone f_clone, FAsString f_as_string)
 Create a mutator with customized methods on the python-side. More...
 
static Map< Mutator, FloatImm, void > DefaultLLVM ()
 Create default mutators for LLVM. More...
 
static Map< Mutator, FloatImm, void > DefaultCUDA ()
 Create default mutators for CUDA. More...
 
static Map< Mutator, FloatImm, void > DefaultCUDATensorCore ()
 Create default mutators for CUDA with TensorCore. More...
 
static Map< Mutator, FloatImm, void > DefaultHexagon ()
 Create default mutators for Hexagon. More...
 
static Map< Mutator, FloatImm, void > DefaultMicro ()
 Create default mutators for Micro. More...
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::runtime::ObjectRef
static constexpr bool _type_is_nullable = true
 
- Protected Member Functions inherited from tvm::runtime::ObjectRef
Objectget_mutable () const
 
- Static Protected Member Functions inherited from tvm::runtime::ObjectRef
template<typename T >
static T DowncastNoCheck (ObjectRef ref)
 Internal helper function downcast a ref without check. More...
 
static void FFIClearAfterMove (ObjectRef *ref)
 Clear the object ref data field without DecRef after we successfully moved the field. More...
 
template<typename ObjectType >
static ObjectPtr< ObjectType > GetDataPtr (const ObjectRef &ref)
 Internal helper function get data_ as ObjectPtr of ObjectType. More...
 
- Protected Attributes inherited from tvm::runtime::ObjectRef
ObjectPtr< Objectdata_
 Internal pointer that backs the reference. More...
 

Detailed Description

Managed reference to MutatorNode.

See also
MutatorNode

Member Typedef Documentation

◆ FApply

Apply the mutator function to the given trace.

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

◆ FAsString

Get the mutator as string with name.

Returns
The string of the mutator.

◆ FClone

Clone the mutator.

Returns
The cloned mutator.

◆ FInitializeWithTuneContext

The function type of InitializeWithTuneContext method.

Parameters
contextThe tuning context for initialization.

Member Function Documentation

◆ DefaultCUDA()

static Map<Mutator, FloatImm, void> tvm::meta_schedule::Mutator::DefaultCUDA ( )
static

Create default mutators for CUDA.

◆ DefaultCUDATensorCore()

static Map<Mutator, FloatImm, void> tvm::meta_schedule::Mutator::DefaultCUDATensorCore ( )
static

Create default mutators for CUDA with TensorCore.

◆ DefaultHexagon()

static Map<Mutator, FloatImm, void> tvm::meta_schedule::Mutator::DefaultHexagon ( )
static

Create default mutators for Hexagon.

◆ DefaultLLVM()

static Map<Mutator, FloatImm, void> tvm::meta_schedule::Mutator::DefaultLLVM ( )
static

Create default mutators for LLVM.

◆ DefaultMicro()

static Map<Mutator, FloatImm, void> tvm::meta_schedule::Mutator::DefaultMicro ( )
static

Create default mutators for Micro.

◆ MutateComputeLocation()

static Mutator tvm::meta_schedule::Mutator::MutateComputeLocation ( )
static

Create a Mutator that mutates the outcome of SampleComputeLocation.

Returns
The mutator created

◆ MutateParallel()

static Mutator tvm::meta_schedule::Mutator::MutateParallel ( int64_t  max_jobs_per_core)
static

Create a Mutator that mutates the parallel extent.

Parameters
max_jobs_per_coreThe maximum number of parallel jobs per core.
Returns
The created mutator.

◆ MutateThreadBinding()

static Mutator tvm::meta_schedule::Mutator::MutateThreadBinding ( )
static

Create a Mutator that mutates auto thread binding.

Returns
The mutator created

◆ MutateTileSize()

static Mutator tvm::meta_schedule::Mutator::MutateTileSize ( )
static

Create a Mutator that mutates the decision of instruction Sample-Perfect-Tile.

◆ MutateUnroll()

static Mutator tvm::meta_schedule::Mutator::MutateUnroll ( )
static

Create a Mutator that mutates auto unroll step.

Returns
The mutator created

◆ PyMutator()

static Mutator tvm::meta_schedule::Mutator::PyMutator ( FInitializeWithTuneContext  f_initialize_with_tune_context,
FApply  f_apply,
FClone  f_clone,
FAsString  f_as_string 
)
static

Create a mutator with customized methods on the python-side.

Parameters
f_initialize_with_tune_contextThe packed function of InitializeWithTuneContext.
f_applyThe packed function of Apply.
f_cloneThe packed function of Clone.
f_as_stringThe packed function of AsString.
Returns
The mutator created.

◆ TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS()

tvm::meta_schedule::Mutator::TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS ( Mutator  ,
ObjectRef  ,
MutatorNode   
)

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