[all-commits] [llvm/llvm-project] cc4703: [mlir][AMDGPU] Add emulation pass for atomics on A...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Wed May 3 14:19:02 PDT 2023
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2023-05-03 (Wed, 03 May 2023)
[mlir][AMDGPU] Add emulation pass for atomics on AMDGPU targets
Not all AMDGPU targets support all atomic operations. For example,
there are not atomic floating-point adds on the gfx10 series. Add a
pass to emulate these operations using a compare-and-swap loop, by
analogy to the generic atomicrmw rewrite in MemrefToLLVM.
This pass is named generally, as in the future we may have a
memref-to-amdgpu that translates constructs like atomicrmw fmax (which
doesn't generally exist in LLVM) to the relevant intrinsics, which may
themselves require emulation.
Since the AMDGPU dialect now has a pass that operates on it, the
dialect's directory structure is reorganized to match other similarly
The pass should be run before amdgpu-to-rocdl if desired.
This commit also adds f64 support to atomic_fmax.
Depends on D148722
Reviewed By: nirvedhmeshram
Differential Revision: https://reviews.llvm.org/D148724
More information about the All-commits