[llvm] [docs][AMDGPU] move DMA operations to a separate file (PR #206917)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 08:51:52 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)
----------------
krzysz00 wrote:
1. Yeah, it's a gather
2. The immediate offset, however, applies to _both_ pointers (just to mess with us :P)
https://github.com/llvm/llvm-project/pull/206917
More information about the llvm-commits
mailing list