|
tvm
|
The context information of the kernel required by op dispatch. More...
#include <context.h>
Public Member Functions | |
| DispatchContextObj (Target target, ThreadScope thread_scope) | |
| DispatchContextObj (ffi::UnsafeInit) | |
| TVM_TIRX_DLL 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. | |
| TVM_TIRX_DLL void | AddInitStmt (Stmt stmt, bool host=false) |
| Add an initialization statement to be inserted. | |
| TVM_TIRX_DLL 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. | |
| ThreadScope | thread_scope |
| The thread 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"). | |
Static Public Attributes | |
| static constexpr bool | _type_mutable = true |
The context information of the kernel required by op dispatch.
|
inline |
|
inlineexplicit |
| TVM_TIRX_DLL 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.
| TVM_TIRX_DLL void tvm::tirx::tile::DispatchContextObj::AddInitStmt | ( | Stmt | stmt, |
| bool | host = false |
||
| ) |
Add an initialization statement to be inserted.
| TVM_TIRX_DLL void tvm::tirx::tile::DispatchContextObj::AddPostTensorDefStmt | ( | TensorVar | tensor, |
| Stmt | stmt | ||
| ) |
Add a statement to be inserted after a tensor's definition.
|
inlinestatic |
|
inline |
Get a value from the shared state cache.
|
inline |
Set a value in the shared state cache.
| tvm::tirx::tile::DispatchContextObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "tirx.DispatchContext" | , |
| DispatchContextObj | , | ||
| ffi::Object | |||
| ) |
|
staticconstexpr |
| bool tvm::tirx::tile::DispatchContextObj::alloc_only |
Whether the dispatch context is only used for tensor allocation.
| ffi::Map<ffi::String, ffi::ObjectRef> tvm::tirx::tile::DispatchContextObj::callbacks |
Callback to be handled when the operator is scheduled.
| 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 thread_scope.local_name in that case.
| ffi::Map<ffi::String, ffi::Array<PrimExpr> > tvm::tirx::tile::DispatchContextObj::intra |
ExecContext intra-team view. Same encoding as inter.
| ffi::Map<ffi::String, ffi::Tuple<PrimVar, PrimExpr> > tvm::tirx::tile::DispatchContextObj::launch_params |
Hardware tag to (index variable, extent) launch parameters.
| ffi::String tvm::tirx::tile::DispatchContextObj::scope_kind |
Scope kind string ("kernel"/"cta"/"warpgroup"/"warp"/"thread"/"cluster").
| 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 tvm::tirx::tile::DispatchContextObj::target |
The target of the kernel.
| ThreadScope tvm::tirx::tile::DispatchContextObj::thread_scope |
The thread scope of the operator.
A map from loop variables to their ranges.