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 function
gmem_edge_masked_load
def gmem_edge_masked_load[dtype: DType, src_space: AddressSpace, //, width: Int](ptr: Pointer[Scalar[dtype], address_space=src_space], mask: Int16) -> SIMD[dtype, width]
Loads an edge-masked vector, treating ptr as device (global) memory (Apple M5 only).
Like edge_masked_load but reinterprets any pointer as global β for a
generic-typed pointer to device memory. Emits AGX3
load.with.emask.global.
Constraints:
width in {1, 2, 4}, dtype 8/16/32/64-bit. Apple M5 only.
Parameters:
- βdtype (
DType): Element type of the pointer (inferred). - βsrc_space (
AddressSpace): Pointer source address space (inferred). - βwidth (
Int): Number of elements to load.
Args:
- βptr (
Pointer[Scalar[dtype], address_space=src_space]): Base pointer of the load, pointing to global memory. - βmask (
Int16): Per-lane active mask, e.g. frombuild_edge_mask.
Returns:
SIMD[dtype, width]: A SIMD[dtype, width]; in-range lanes loaded, masked-off lanes zero.