For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
layout_tensor
Provides the LayoutTensor type for representing multidimensional data.
comptime valuesβ
binary_op_typeβ
comptime binary_op_type = def[dtype: DType, width: SIMDLength](lhs: SIMD[dtype, width], rhs: SIMD[dtype, width]) thin -> SIMD[dtype, width]
Type alias for binary operations on SIMD vectors.
This type represents a function that takes two SIMD vectors of the same type and width and returns a SIMD vector of the same type and width.
Args: dtype: The data type of the SIMD vector elements. width: The width of the SIMD vector. lhs: Left-hand side SIMD vector operand. rhs: Right-hand side SIMD vector operand.
Returns: A SIMD vector containing the result of the binary operation.
Structsβ
- β
LayoutTensor: A high-performance tensor with explicit memory layout and hardware-optimized access patterns. - β
LayoutTensorIter: Iterator for traversing a memory buffer with a specific layout. - β
ThreadScope: Represents the scope of thread operations in GPU programming.
Functionsβ
- β
copy_dram_to_local: Efficiently copy data from global memory (DRAM) to registers for AMD GPUs. - β
copy_dram_to_sram: Synchronously copy data from DRAM (global memory) to SRAM (shared memory) in a GPU context. - β
copy_dram_to_sram_async: Asynchronously copy data from DRAM (global memory) to SRAM (shared memory) in a GPU context. - β
copy_local_to_dram: Efficiently copy data from registers (LOCAL) to global memory (DRAM). - β
copy_local_to_local: Synchronously copy data between local memory (register) tensors with type conversion. - β
copy_local_to_shared: Synchronously copy data from local memory (registers) to SRAM (shared memory). - β
copy_sram_to_dram: Synchronously copy data from SRAM (shared memory) to DRAM (global memory). - β
copy_sram_to_local: Synchronously copy data from SRAM (shared memory) to local memory. - β
cp_async_k_major: Asynchronously copy data from DRAM to SRAM using TMA (Tensor Memory Accelerator) with K-major layout. - β
stack_allocation_like: Create a stack-allocated tensor with the same layout as an existing tensor.