Skip to main content

Mojo function

buffer_load_lds

buffer_load_lds[dtype: DType, *, width: Int = 1, cache_policy: CacheOperation = CacheOperation(0)](src_resource: SIMD[uint32, 4], vector_offset: SIMD[int32, 1], shared_ptr: UnsafePointer[SIMD[dtype, 1], address_space=AddressSpace(3)], *, scalar_offset: SIMD[int32, 1] = 0)

Loads data from global memory and stores to shared memory.

Copies from global memory to shared memory (aka LDS) bypassing storing to register.

Parameters:

  • dtype (DType): The dtype of the data to be loaded.
  • width (Int): The SIMD vector width.
  • cache_policy (CacheOperation): Cache operation policy controlling cache behavior at all levels.

Args:

  • src_resource (SIMD): Buffer resource descriptor from make_buffer_resource.
  • vector_offset (SIMD): Vector memory offset in elements (per thread).
  • shared_ptr (UnsafePointer): Shared memory address.
  • scalar_offset (SIMD): Scalar memory offset in elements (shared across wave).

Was this page helpful?