GEMM Operations
gemm
Performs General Matrix Multiply-Accumulate (GEMM) operation:D = A * B + C.
MmaAtom
required
MMA atom defining the computation pattern (e.g., warp-level or warpgroup-level MMA)
Tensor
required
Destination tensor (output)
Union[Tensor, List[Tensor]]
required
First source tensor or
[tensor, scale_factor] for block-scaled GEMMUnion[Tensor, List[Tensor]]
required
Second source tensor or
[tensor, scale_factor] for block-scaled GEMMTensor
required
Accumulator tensor (can alias with
d)Copy Operations
copy
Performs atomic or tiled copy from source to destination tensor.CopyAtom
required
Copy atom defining the copy pattern
Tensor
required
Source tensor
Tensor
required
Destination tensor
basic_copy
Performs basic element-wise copy without atoms (for simple cases).Tensor
required
Source tensor
Tensor
required
Destination tensor (must have same size as src)
basic_copy_if
Performs predicated element-wise copy.Tensor
required
Predicate tensor (boolean values)
Tensor
required
Source tensor
Tensor
required
Destination tensor
autovec_copy
Performs vectorized copy with automatic vectorization.prefetch
Prefetches data into cache.Tensor
required
Tensor to prefetch
CacheEvictionPriority
default:"EVICT_FIRST"
Cache eviction priority
Tensor Operations
print_tensor
Prints tensor contents (for debugging).printf
Prints formatted output from device code.Reduction Operations
any_
Returns True if any element in the tensor is non-zero.all_
Returns True if all elements in the tensor are non-zero.Conditional Operations
where
Element-wise conditional selection.Tensor
required
Boolean condition tensor
Tensor
required
Values to select when condition is True
Tensor
required
Values to select when condition is False
Control Flow
for_generate
Generates loop iterations in device code.if_generate
Generates conditional branches in device code.Complete GEMM Example
See Also
- Kernel Definition - Defining GPU kernels
- Atom Operations - Copy and MMA atoms
- Memory Operations - Memory management