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 = ffi::TypedFunction< void(const TuneContext &)>
 The function type of InitializeWithTuneContext method. More...
 
using FGenerateDesignSpace = ffi::TypedFunction< Array< tir::Schedule >(const IRModule &)>
 The function type of GenerateDesignSpace method. More...
 
using FClone = ffi::TypedFunction< SpaceGenerator()>
 The function type of Clone method. More...
 

Public Member Functions

 TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS (SpaceGenerator, ObjectRef, SpaceGeneratorNode)
 

Static Public Member Functions

static SpaceGenerator PySpaceGenerator (Optional< Array< ScheduleRule >> sch_rules, Optional< Array< Postproc >> postprocs, Optional< Map< Mutator, FloatImm >> mutator_probs, 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 (ffi::Function schedule_fn, Optional< Array< ScheduleRule >> sch_rules, Optional< Array< Postproc >> postprocs, Optional< Map< Mutator, FloatImm >> mutator_probs)
 Create a design space generator with customized schedule function. More...
 
static SpaceGenerator SpaceGeneratorUnion (Array< SpaceGenerator, void > space_generators, Optional< Array< ScheduleRule >> sch_rules, Optional< Array< Postproc >> postprocs, Optional< Map< Mutator, FloatImm >> mutator_probs)
 Create a design space generator that is union of multiple design space generators. More...
 
static SpaceGenerator PostOrderApply (ffi::Function f_block_filter, Optional< Array< ScheduleRule >> sch_rules, Optional< Array< Postproc >> postprocs, Optional< Map< Mutator, FloatImm >> mutator_probs)
 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
 

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 ( ffi::Function  f_block_filter,
Optional< Array< ScheduleRule >>  sch_rules,
Optional< Array< Postproc >>  postprocs,
Optional< Map< Mutator, FloatImm >>  mutator_probs 
)
static

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

Parameters
f_block_filterThe filter function to filter blocks to be applied with schedule rules.
sch_rulesThe schedule rules.
postprocsThe postprocessors.
mutator_probsThe probability of using certain mutator.
Returns
The design space generator created.

◆ PySpaceGenerator()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::PySpaceGenerator ( Optional< Array< ScheduleRule >>  sch_rules,
Optional< Array< Postproc >>  postprocs,
Optional< Map< Mutator, FloatImm >>  mutator_probs,
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
sch_rulesThe schedule rules.
postprocsThe postprocessors.
mutator_probsThe probability of using certain mutator.
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 ( ffi::Function  schedule_fn,
Optional< Array< ScheduleRule >>  sch_rules,
Optional< Array< Postproc >>  postprocs,
Optional< Map< Mutator, FloatImm >>  mutator_probs 
)
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)
sch_rulesThe schedule rules.
postprocsThe postprocessors.
mutator_probsThe probability of using certain mutator.

◆ SpaceGeneratorUnion()

static SpaceGenerator tvm::meta_schedule::SpaceGenerator::SpaceGeneratorUnion ( Array< SpaceGenerator, void >  space_generators,
Optional< Array< ScheduleRule >>  sch_rules,
Optional< Array< Postproc >>  postprocs,
Optional< Map< Mutator, FloatImm >>  mutator_probs 
)
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.
sch_rulesThe schedule rules.
postprocsThe postprocessors.
mutator_probsThe probability of using certain mutator.
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: