IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

TensorMemory

struct TensorMemory

A wrapper around tensor memory allocated for tcgen05 instructions.

Fields

  • ptr (UnsafePointer[UInt32, MutAnyOrigin, address_space=AddressSpace.SHARED]): Pointer to the tensor memory address.
  • num_cols (UInt32): The number of columns in the tensor memory.

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable

Methods

__init__

__init__(num_cols: UInt32) -> Self

Initialize the TensorMemory struct.

Args:

  • num_cols (UInt32): The number of columns to allocate.