[llvm] [docs][AMDGPU] move DMA operations to a separate file (PR #206917)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 07:51:33 PDT 2026
================
@@ -0,0 +1,145 @@
+(amdgpu-dma-operations)=
+
+# AMDGPU DMA Operations
+
+```{contents}
+:local:
+```
+
+## Introduction
+
+DMA operations transfer data between different kinds of memory directly without
+occupying registers in the invoking wave. They are usually
+{ref}`asynchronous<amdgpu-async-operations>` asynchronous, and require the user
+to explicitly track completion using {ref}`asyncmarks<amdgpu-async-operations>`.
+
+All DMA operations support the same cache modifiers as ordinary load/store
+operations from registers. They cannot be performed atomically.
+
+### GFX9 DMA
+
+Each GFX9 DMA instruction has a synchronous counterpart (e.g.,
+``@llvm.amdgcn.load.to.lds`` for ``@llvm.amdgcn.load.async.to.lds``). The
+synchronous variants perform the same operation, but the compiler automatically
+ensures completion before their side-effects are used.
+
+GFX9 DMA instructions implement volatile (via ``aux/cpol`` bit 31) and
+nontemporal (via metadata) as if they were loads from the global address space.
+
+**Flat/Global Addressing**
+
+```llvm
+void @llvm.amdgcn.load[.async].to.lds.pN(
+ ptr addrspace(N) %src, ; base pointer to load from (per-lane)
----------------
joalsop wrote:
minor point - "base pointer" intuitively implies to me that each lane could have an offset from that pointer, as is specified for LDS. if we are allowing lanes to specify their own global address (e.g., to allow gather/scatter), do we want to remove "base" from the description?
https://github.com/llvm/llvm-project/pull/206917
More information about the llvm-commits
mailing list