Skip to main content
Log in

Mojo struct

TensorMemory

@register_passable(trivial) struct TensorMemory

A wrapper around tensor memory allocated for tcgen05 instructions.

Fields

  • ptr (UnsafePointer[SIMD[uint32, 1], address_space=AddressSpace(3), alignment=16]): Pointer to the tensor memory address.
  • num_cols (SIMD[uint32, 1]): The number of columns in the tensor memory.

Implemented traits

AnyType, Copyable, Movable, UnknownDestructibility

Methods

__init__

__init__(num_cols: SIMD[uint32, 1]) -> Self

Initialize the TensorMemory struct.

Args:

  • num_cols (SIMD[uint32, 1]): The number of columns to allocate.