tvm
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::tirx::DispatchContextNode Class Reference

The context information of the kernel required by op dispatch. More...

#include <tirx_op.h>

Inheritance diagram for tvm::tirx::DispatchContextNode:
Collaboration diagram for tvm::tirx::DispatchContextNode:

Public Member Functions

void AddAllocBuffer (Buffer buffer)
 Add a buffer to be allocated in the kernel. More...
 
void AddInitStmt (Stmt stmt, bool host=false)
 Add an initialization statement to be inserted. More...
 
void AddPostBufferDefStmt (Buffer buffer, Stmt stmt)
 Add a statement to be inserted after a buffer's definition. More...
 
void SharedStateSet (ffi::String key, ffi::ObjectRef value)
 Set a value in the shared state cache. More...
 
ffi::Optional< ffi::ObjectRef > SharedStateGet (ffi::String key)
 Get a value from the shared state cache. More...
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.DispatchContext", DispatchContextNode, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

Target target
 The target of the kernel. More...
 
ExecScope exec_scope
 The exec scope of the operator. More...
 
ffi::Map< ffi::String, IterVarlaunch_params
 The kernel launch parameters. More...
 
ffi::Map< Var, Rangevar_range_map
 A map from loop variables to their ranges. More...
 
bool alloc_only
 Whether the dispatch context is only used for buffer allocation. More...
 
ffi::Map< ffi::String, ffi::ObjectRef > callbacks
 Callback to be handled when the operator is scheduled. More...
 
ffi::Map< ffi::String, ffi::ObjectRef > shared_state
 Shared state that persists across dispatch calls within a single lowering pass. More...
 
ffi::Map< ffi::String, ffi::Array< PrimExpr > > inter
 ExecContext inter-team view at this op site. More...
 
ffi::Map< ffi::String, ffi::Array< PrimExpr > > intra
 ExecContext intra-team view. Same encoding as inter. More...
 
ffi::String scope_kind
 Scope kind string ("kernel"/"cta"/"warpgroup"/"warp"/"thread"/"cluster"). More...
 

Detailed Description

The context information of the kernel required by op dispatch.

Member Function Documentation

◆ AddAllocBuffer()

void tvm::tirx::DispatchContextNode::AddAllocBuffer ( Buffer  buffer)

Add a buffer to be allocated in the kernel.

◆ AddInitStmt()

void tvm::tirx::DispatchContextNode::AddInitStmt ( Stmt  stmt,
bool  host = false 
)

Add an initialization statement to be inserted.

◆ AddPostBufferDefStmt()

void tvm::tirx::DispatchContextNode::AddPostBufferDefStmt ( Buffer  buffer,
Stmt  stmt 
)

Add a statement to be inserted after a buffer's definition.

◆ RegisterReflection()

static void tvm::tirx::DispatchContextNode::RegisterReflection ( )
inlinestatic

◆ SharedStateGet()

ffi::Optional<ffi::ObjectRef> tvm::tirx::DispatchContextNode::SharedStateGet ( ffi::String  key)

Get a value from the shared state cache.

◆ SharedStateSet()

void tvm::tirx::DispatchContextNode::SharedStateSet ( ffi::String  key,
ffi::ObjectRef  value 
)

Set a value in the shared state cache.

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::tirx::DispatchContextNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "tirx.DispatchContext"  ,
DispatchContextNode  ,
ffi::Object   
)

Member Data Documentation

◆ alloc_only

bool tvm::tirx::DispatchContextNode::alloc_only

Whether the dispatch context is only used for buffer allocation.

◆ callbacks

ffi::Map<ffi::String, ffi::ObjectRef> tvm::tirx::DispatchContextNode::callbacks

Callback to be handled when the operator is scheduled.

◆ exec_scope

ExecScope tvm::tirx::DispatchContextNode::exec_scope

The exec scope of the operator.

◆ inter

ffi::Map<ffi::String, ffi::Array<PrimExpr> > tvm::tirx::DispatchContextNode::inter

ExecContext inter-team view at this op site.

Maps axis name ("laneid"/"warpid"/"cta_id"/"wid_in_wg"/"wgid") to a 2-element [extent, offset] PrimExpr array. Empty map = no ExecContext tracking available (fallback for unresolved filters, pre-Phase-4 call sites, etc.); dispatchers should fall back to exec_scope.name in that case.

◆ intra

ffi::Map<ffi::String, ffi::Array<PrimExpr> > tvm::tirx::DispatchContextNode::intra

ExecContext intra-team view. Same encoding as inter.

◆ launch_params

ffi::Map<ffi::String, IterVar> tvm::tirx::DispatchContextNode::launch_params

The kernel launch parameters.

◆ scope_kind

ffi::String tvm::tirx::DispatchContextNode::scope_kind

Scope kind string ("kernel"/"cta"/"warpgroup"/"warp"/"thread"/"cluster").

◆ shared_state

ffi::Map<ffi::String, ffi::ObjectRef> tvm::tirx::DispatchContextNode::shared_state

Shared state that persists across dispatch calls within a single lowering pass.

◆ target

Target tvm::tirx::DispatchContextNode::target

The target of the kernel.

◆ var_range_map

ffi::Map<Var, Range> tvm::tirx::DispatchContextNode::var_range_map

A map from loop variables to their ranges.


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