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

Managed reference to PostprocNode. More...

#include <postproc.h>

Inheritance diagram for tvm::meta_schedule::Postproc:
Collaboration diagram for tvm::meta_schedule::Postproc:

Public Member Functions

 TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS (Postproc, ObjectRef, PostprocNode)
 
- 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 Postproc PyPostproc (PyPostprocNode::FInitializeWithTuneContext f_initialize_with_tune_context, PyPostprocNode::FApply f_apply, PyPostprocNode::FAsString f_as_string)
 Create a postprocessor with customized methods on the python-side. More...
 
static Postproc DisallowDynamicLoop ()
 Create a postprocessor that checks if all loops are static. More...
 
static Postproc RewriteCooperativeFetch ()
 Create a postprocessor that rewrites the cooperative fetch annotation to actual vectorized cooperative fetching in loop bindings. More...
 
static Postproc RewriteParallelVectorizeUnroll ()
 Creates a postprocessor that applies parallelization, vectorization and auto unrolling according to the annotation of each block. More...
 
static Postproc RewriteReductionBlock ()
 Create a postprocessor that rewrites reduction block by moving the init block out. More...
 
static Postproc RewriteUnboundBlock (int max_threadblocks)
 Create a postprocessor that adds thread binding to unbound blocks. More...
 
static Postproc RewriteTensorize (bool vectorize_init_loop=false)
 Create a postprocessor that applies tensorization to annotated blocks. More...
 
static Postproc VerifyGPUCode ()
 Creates a postprocessor that verifies if the GPU code is correct. More...
 
static Postproc RewriteLayout ()
 Creates a postprocessor that rewrites the layout of input tensor. More...
 

Additional Inherited Members

- Public Types inherited from tvm::runtime::ObjectRef
using ContainerType = Object
 type indicate the container type. More...
 
- 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 PostprocNode.

See also
PostprocNode

Member Function Documentation

◆ DisallowDynamicLoop()

static Postproc tvm::meta_schedule::Postproc::DisallowDynamicLoop ( )
static

Create a postprocessor that checks if all loops are static.

Returns
The postprocessor created

◆ PyPostproc()

static Postproc tvm::meta_schedule::Postproc::PyPostproc ( PyPostprocNode::FInitializeWithTuneContext  f_initialize_with_tune_context,
PyPostprocNode::FApply  f_apply,
PyPostprocNode::FAsString  f_as_string 
)
static

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

Parameters
f_initialize_with_tune_contextThe packed function of InitializeWithTuneContext.
f_applyThe packed function of Apply.
f_as_stringThe packed function of AsString.
Returns
The postprocessor created.

◆ RewriteCooperativeFetch()

static Postproc tvm::meta_schedule::Postproc::RewriteCooperativeFetch ( )
static

Create a postprocessor that rewrites the cooperative fetch annotation to actual vectorized cooperative fetching in loop bindings.

Returns
The postprocessor created.

◆ RewriteLayout()

static Postproc tvm::meta_schedule::Postproc::RewriteLayout ( )
static

Creates a postprocessor that rewrites the layout of input tensor.

Note
Weight layout rewrite is supported so far, activation layout rewrite will be added.
Returns
The postprocessor created

◆ RewriteParallelVectorizeUnroll()

static Postproc tvm::meta_schedule::Postproc::RewriteParallelVectorizeUnroll ( )
static

Creates a postprocessor that applies parallelization, vectorization and auto unrolling according to the annotation of each block.

Returns
The postprocessor created

◆ RewriteReductionBlock()

static Postproc tvm::meta_schedule::Postproc::RewriteReductionBlock ( )
static

Create a postprocessor that rewrites reduction block by moving the init block out.

Returns
The postprocessor created.

◆ RewriteTensorize()

static Postproc tvm::meta_schedule::Postproc::RewriteTensorize ( bool  vectorize_init_loop = false)
static

Create a postprocessor that applies tensorization to annotated blocks.

Parameters
vectorize_init_loopWhether or not vectorize the initialization loop produced by DecomposeReduction
Returns
The postprocessor created.

◆ RewriteUnboundBlock()

static Postproc tvm::meta_schedule::Postproc::RewriteUnboundBlock ( int  max_threadblocks)
static

Create a postprocessor that adds thread binding to unbound blocks.

Parameters
max_threadblocksThe max number of threadblocks in the cuda device.
Returns
The postprocessor created.

◆ TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS()

tvm::meta_schedule::Postproc::TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS ( Postproc  ,
ObjectRef  ,
PostprocNode   
)

◆ VerifyGPUCode()

static Postproc tvm::meta_schedule::Postproc::VerifyGPUCode ( )
static

Creates a postprocessor that verifies if the GPU code is correct.

Returns
The postprocessor created

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