tvm
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
tvm::meta_schedule::MetaScheduleContext Class Reference

Managed reference to MetaScheduleContextNode. More...

#include <integration.h>

Inheritance diagram for tvm::meta_schedule::MetaScheduleContext:
Collaboration diagram for tvm::meta_schedule::MetaScheduleContext:

Public Member Functions

virtual ~MetaScheduleContext ()=default
 Default destructor. More...
 
 TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS (MetaScheduleContext, runtime::ObjectRef, MetaScheduleContextNode)
 
- 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 Optional< MetaScheduleContextCurrent ()
 The context manager in the current scope. More...
 
static Optional< ObjectRefQueryInsideWithScope (runtime::String task_name, IRModule mod, Optional< Array< IRModule >> dispatched)
 The entry point of the integration workflow. The compilation process of the high-level IR should call this method for task extraction and for feedback hints. More...
 

Protected Member Functions

 MetaScheduleContext ()=default
 Default constructor. More...
 
void EnterWithScope ()
 Entering the scope of the context manager. More...
 
void ExitWithScope ()
 Exiting the scope of the context manager. More...
 
- Protected Member Functions inherited from tvm::runtime::ObjectRef
Objectget_mutable () const
 

Friends

class MetaScheduleContextInternal
 
class With< MetaScheduleContext >
 

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
 
- 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 MetaScheduleContextNode.

See also
MetaScheduleContextNode

Constructor & Destructor Documentation

◆ ~MetaScheduleContext()

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

Default destructor.

◆ MetaScheduleContext()

tvm::meta_schedule::MetaScheduleContext::MetaScheduleContext ( )
protecteddefault

Default constructor.

Member Function Documentation

◆ Current()

static Optional<MetaScheduleContext> tvm::meta_schedule::MetaScheduleContext::Current ( )
static

The context manager in the current scope.

Returns
The MetaScheduleContext in the current scope. NullOpt if it's currently not under any MetaScheduleContext.

◆ EnterWithScope()

void tvm::meta_schedule::MetaScheduleContext::EnterWithScope ( )
protected

Entering the scope of the context manager.

◆ ExitWithScope()

void tvm::meta_schedule::MetaScheduleContext::ExitWithScope ( )
protected

Exiting the scope of the context manager.

◆ QueryInsideWithScope()

static Optional<ObjectRef> tvm::meta_schedule::MetaScheduleContext::QueryInsideWithScope ( runtime::String  task_name,
IRModule  mod,
Optional< Array< IRModule >>  dispatched 
)
static

The entry point of the integration workflow. The compilation process of the high-level IR should call this method for task extraction and for feedback hints.

Parameters
task_nameThe name of the task
modThe high-level IR
dispatchedA list of low-level IRs that the high-level IR could potentially dispatch to
Returns
There are different types of the output 1) NullOpt if there is no feedback hint 2) tir::PrimFunc if mod should be lowered to a PrimFunc 3) relay::Function if mod should be dispatched to BYOC workflow 4) IRModule for unified dispatch

◆ TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS()

tvm::meta_schedule::MetaScheduleContext::TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS ( MetaScheduleContext  ,
runtime::ObjectRef  ,
MetaScheduleContextNode   
)

Friends And Related Function Documentation

◆ MetaScheduleContextInternal

friend class MetaScheduleContextInternal
friend

◆ With< MetaScheduleContext >

friend class With< MetaScheduleContext >
friend

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