Mojo function
cp_async_bulk_prefetch
cp_async_bulk_prefetch[src_type: AnyType, /, *, eviction_policy: CacheEviction = CacheEviction.EVICT_NORMAL](src_mem: UnsafePointer[src_type, src_mem.origin, address_space=src_mem.address_space], size: Int32)
Initiates an asynchronous prefetch from global memory to L2 cache.
Performs a non-blocking prefetch of size bytes from global memory into
the L2 cache. This is a hint to the memory subsystem and does not
guarantee the data will be in cache when accessed.
src_mem must be 16-byte aligned and size must be a multiple of 16.
Requires sm_90 or higher.
Parameters:
- βsrc_type (
AnyType): The element type of the source global memory. - βeviction_policy (
CacheEviction): Cache eviction policy for the L2 cache. Defaults toEVICT_NORMAL.
Args:
- βsrc_mem (
UnsafePointer): Source pointer in global or generic memory (16-byte aligned). - βsize (
Int32): Number of bytes to prefetch (must be a multiple of 16).
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!