tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::tirx::tile::DispatchContextObj Class Reference

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

#include <context.h>

Inheritance diagram for tvm::tirx::tile::DispatchContextObj:
Collaboration diagram for tvm::tirx::tile::DispatchContextObj:

Public Member Functions

 DispatchContextObj (Target target, ExecScope exec_scope)
 
 DispatchContextObj (ffi::UnsafeInit)
 
void AddAllocTensor (TensorVar tensor, ffi::Array< PrimExpr > allocated_addr={}, ffi::Map< ffi::String, ffi::Any > annotations={})
 Add a tensor to be allocated in the kernel.
 
void AddInitStmt (Stmt stmt, bool host=false)
 Add an initialization statement to be inserted.
 
void AddPostTensorDefStmt (TensorVar tensor, Stmt stmt)
 Add a statement to be inserted after a tensor's definition.
 
void SharedStateSet (ffi::String key, ffi::ObjectRef value)
 Set a value in the shared state cache.
 
ffi::Optional< ffi::ObjectRef > SharedStateGet (ffi::String key)
 Get a value from the shared state cache.
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.DispatchContext", DispatchContextObj, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

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

Detailed Description

The context information of the kernel required by op dispatch.

Constructor & Destructor Documentation

◆ DispatchContextObj() [1/2]

tvm::tirx::tile::DispatchContextObj::DispatchContextObj ( Target  target,
ExecScope  exec_scope 
)
inline

◆ DispatchContextObj() [2/2]

tvm::tirx::tile::DispatchContextObj::DispatchContextObj ( ffi::UnsafeInit  )
inlineexplicit

Member Function Documentation

◆ AddAllocTensor()

void tvm::tirx::tile::DispatchContextObj::AddAllocTensor ( TensorVar  tensor,
ffi::Array< PrimExpr >  allocated_addr = {},
ffi::Map< ffi::String, ffi::Any >  annotations = {} 
)

Add a tensor to be allocated in the kernel.

◆ AddInitStmt()

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

Add an initialization statement to be inserted.

◆ AddPostTensorDefStmt()

void tvm::tirx::tile::DispatchContextObj::AddPostTensorDefStmt ( TensorVar  tensor,
Stmt  stmt 
)

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

◆ RegisterReflection()

static void tvm::tirx::tile::DispatchContextObj::RegisterReflection ( )
inlinestatic

◆ SharedStateGet()

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

Get a value from the shared state cache.

◆ SharedStateSet()

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

Set a value in the shared state cache.

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

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

Member Data Documentation

◆ alloc_only

bool tvm::tirx::tile::DispatchContextObj::alloc_only

Whether the dispatch context is only used for tensor allocation.

◆ callbacks

ffi::Map<ffi::String, ffi::ObjectRef> tvm::tirx::tile::DispatchContextObj::callbacks

Callback to be handled when the operator is scheduled.

◆ exec_scope

ExecScope tvm::tirx::tile::DispatchContextObj::exec_scope

The exec scope of the operator.

◆ inter

ffi::Map<ffi::String, ffi::Array<PrimExpr> > tvm::tirx::tile::DispatchContextObj::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::tile::DispatchContextObj::intra

ExecContext intra-team view. Same encoding as inter.

◆ launch_params

ffi::Map<ffi::String, ffi::Tuple<PrimVar, PrimExpr> > tvm::tirx::tile::DispatchContextObj::launch_params

Hardware tag to (index variable, extent) launch parameters.

◆ scope_kind

ffi::String tvm::tirx::tile::DispatchContextObj::scope_kind

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

◆ shared_state

ffi::Map<ffi::String, ffi::ObjectRef> tvm::tirx::tile::DispatchContextObj::shared_state

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

◆ target

Target tvm::tirx::tile::DispatchContextObj::target

The target of the kernel.

◆ var_range_map

ffi::Map<Var, Range> tvm::tirx::tile::DispatchContextObj::var_range_map

A map from loop variables to their ranges.


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