[clang] [llvm] [AMDGPU] Implement AsyncMark Stages (PR #220442)

Ryan Mitchell via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 19:48:28 PDT 2026


================
@@ -16,31 +16,66 @@ internally by the compiler. A thread that initiates one or more async operations
 An *asyncmark* created by a thread can be used to track async operations
 initiated by that thread.
 
+### Stages
+
+Every asyncmark belongs to a *stage*, which names a kind of async operation.
+Each async operation has an *own stage*, determined by the instruction that
+initiates it, and *belongs to* that stage and to the stage `ALL`.
+
+The stages are:
+
+| Value | Stage | Async operations |
+|---|---|---|
+| 0 | `TENSOR` | tensor loads and stores |
+| 1 | `GLOBAL_LOAD_ASYNC_TO_LDS` | global loads async to LDS |
+| 2 | `GLOBAL_LOAD_ASYNC_TO_LDS_MCAST` | multicast (cluster) global loads async to LDS |
+| 3 | `ASYNC_LDS_STORE` | async stores from LDS |
+| 5 | `UNFORMATTED_BUFFER_GLOBAL_LOAD` | unformatted buffer and global loads to LDS |
----------------
RyanRio wrote:

Realized that pre gfx1250 global loads actually do fall into this stage, so adjusted accordingly, and unformatted and formatted share a stage gfx1250 and below.

https://github.com/llvm/llvm-project/pull/220442


More information about the cfe-commits mailing list