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

Managed reference to SpaceGeneratorNode. More...

#include <space_generator.h>

Inheritance diagram for tvm::meta_schedule::SpaceGenerator:
Collaboration diagram for tvm::meta_schedule::SpaceGenerator:

Public Types

using FInitializeWithTuneContext = runtime::TypedPackedFunc< void(const TuneContext &)>
 The function type of InitializeWithTuneContext method. More...
 
using FGenerateDesignSpace = runtime::TypedPackedFunc< Array< tir::Schedule >(const IRModule &)>
 The function type of GenerateDesignSpace method. More...
 
using FClone = runtime::TypedPackedFunc< SpaceGenerator()>
 The function type of Clone method. More...
 
- Public Types inherited from tvm::runtime::ObjectRef
using ContainerType = Object
 type indicate the container type. More...
 

Public Member Functions

 TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS (SpaceGenerator, ObjectRef, SpaceGeneratorNode)
 
- 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 >
const ObjectType * as () const
 Try to downcast the internal Object to a raw pointer of a corresponding type. More...
 

Static Public Member Functions

static SpaceGenerator PySpaceGenerator (FInitializeWithTuneContext f_initialize_with_tune_context, FGenerateDesignSpace f_generate_design_space, FClone f_clone)
 Create a design space generator with customized methods on the python-side. More...
 
static SpaceGenerator ScheduleFn (PackedFunc schedule_fn)
 Create a design space generator with customized schedule function. More...
 
static SpaceGenerator SpaceGeneratorUnion (Array< SpaceGenerator, void > space_generators)
 Create a design space generator that is union of multiple design space generators. More...
 
static SpaceGenerator PostOrderApply (runtime::PackedFunc f_block_filter=nullptr)
 Create a design space generator that generates design spaces by applying schedule rules to blocks in post-DFS order. More...
 

Protected Member Functions

 SpaceGenerator ()=default
 
- Protected Member Functions inherited from tvm::runtime::ObjectRef
Objectget_mutable () const
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::runtime::ObjectRef
static constexpr bool _type_is_nullable = true
 
- 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 SpaceGeneratorNode.

See also
SpaceGeneratorNode

Member Typedef Documentation

◆ FClone

The function type of Clone method.

Returns
The cloned space generator.

◆ FGenerateDesignSpace

The function type of GenerateDesignSpace method.

Parameters
modThe module used for design space generation.
Returns
The generated design spaces, i.e., schedules.

◆ FInitializeWithTuneContext

The function type of InitializeWithTuneContext method.

Parameters
contextThe tuning context for initialization.

Constructor & Destructor Documentation

◆ SpaceGenerator()

tvm::meta_schedule::SpaceGenerator::SpaceGenerator ( )
protecteddefault

Member Function Documentation

◆ PostOrderApply()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::PostOrderApply ( runtime::PackedFunc  f_block_filter = nullptr)
static

Create a design space generator that generates design spaces by applying schedule rules to blocks in post-DFS order.

Returns
The design space generator created.

◆ PySpaceGenerator()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::PySpaceGenerator ( FInitializeWithTuneContext  f_initialize_with_tune_context,
FGenerateDesignSpace  f_generate_design_space,
FClone  f_clone 
)
static

Create a design space generator with customized methods on the python-side.

Parameters
f_initialize_with_tune_contextThe packed function of InitializeWithTuneContext.
f_generate_design_spaceThe packed function of GenerateDesignSpace.
f_cloneThe packed function of Clone.
Returns
The design space generator created.

◆ ScheduleFn()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::ScheduleFn ( PackedFunc  schedule_fn)
static

Create a design space generator with customized schedule function.

Parameters
schedule_fnThe schedule function, which can have the following signatures: 1) void(Schedule) 2) Schedule(Schedule) 3) Array<Schedule>(Schedule)

◆ SpaceGeneratorUnion()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::SpaceGeneratorUnion ( Array< SpaceGenerator, void >  space_generators)
static

Create a design space generator that is union of multiple design space generators.

Parameters
space_generatorsAn array of design space generators to be unioned.
Returns
The design space generator created.

◆ TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS()

tvm::meta_schedule::SpaceGenerator::TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS ( SpaceGenerator  ,
ObjectRef  ,
SpaceGeneratorNode   
)

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