IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0.0b1
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

cp_async_bulk_global_shared_cta

cp_async_bulk_global_shared_cta[dst_type: AnyType, src_type: AnyType, /, *, eviction_policy: CacheEviction = CacheEviction.EVICT_NORMAL](dst_mem: UnsafePointer[dst_type, address_space=dst_mem.address_space], src_mem: UnsafePointer[src_type, address_space=AddressSpace.SHARED], size: Int32)

Initiates an asynchronous bulk copy from shared CTA memory to global memory.

Performs a non-blocking copy of size bytes from shared memory to global memory using the cp.async.bulk PTX instruction with the .bulk_group completion mechanism. Use cp_async_bulk_commit_group and cp_async_bulk_wait_group from std.gpu.sync to synchronize.

Both dst_mem and src_mem must be 16-byte aligned, and size must be a multiple of 16. Requires sm_100 or higher.

Parameters:

  • dst_type (AnyType): The element type of the destination global memory.
  • src_type (AnyType): The element type of the source shared memory.
  • eviction_policy (CacheEviction): Cache eviction policy for the L2 cache. Defaults to EVICT_NORMAL.

Args: