Mojo struct
TensorMemory
@register_passable(trivial)
struct TensorMemory
A wrapper around tensor memory allocated for tcgen05 instructions.
Fields
- ptr (UnsafePointer[UInt32, address_space=AddressSpace(3)]): Pointer to the tensor memory address.
- num_cols (UInt32): The number of columns in the tensor memory.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
Movable,
UnknownDestructibility
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = UInt32.__copyinit__is_trivial if UnsafePointer[UInt32, address_space=AddressSpace(3)].__copyinit__is_trivial else UnsafePointer[UInt32, address_space=AddressSpace(3)].__copyinit__is_trivial
__del__is_trivial
alias __del__is_trivial = UInt32.__del__is_trivial if UnsafePointer[UInt32, address_space=AddressSpace(3)].__del__is_trivial else UnsafePointer[UInt32, address_space=AddressSpace(3)].__del__is_trivial
__moveinit__is_trivial
alias __moveinit__is_trivial = UInt32.__moveinit__is_trivial if UnsafePointer[UInt32, address_space=AddressSpace(3)].__moveinit__is_trivial else UnsafePointer[UInt32, address_space=AddressSpace(3)].__moveinit__is_trivial
Methods
__init__
__init__(num_cols: UInt32) -> Self
Initialize the TensorMemory struct.
Args:
- num_cols (UInt32): The number of columns to allocate.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
