Mojo struct
TmemAllocation
struct TmemAllocation[cta_group: Int, max_cols: Int = 512]
Handle to allocated Tensor Memory.
Lifecycle: allocate() β use β release_lock() β wait β deallocate()
Parametersβ
Fieldsβ
- βaddr (
UInt32):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
SmemAddrStorageβ
comptime SmemAddrStorage = SMemArray[UInt32, 1]
Methodsβ
__init__β
__init__(addr: UInt32) -> Self
allocateβ
static allocate(smem_addr: SMemArray[UInt32, 1]) -> Self
Allocate TMEM (MMA warp). Address stored in smem for epilogue.
from_sharedβ
static from_shared(smem_addr: SMemArray[UInt32, 1]) -> Self
Get handle from existing allocation (epilogue warp).
release_lockβ
release_lock(self)
Release allocation lock before waiting for epilogue.
deallocateβ
deallocate(self)
Free TMEM after epilogue completion.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!