[llvm] [NVPTX] Add support for atomic add for f16 type (PR #84295)

Adrian Kuegel via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 23:40:36 PST 2024


================
@@ -6100,6 +6100,8 @@ NVPTXTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const {
 
   if (AI->isFloatingPointOperation()) {
     if (AI->getOperation() == AtomicRMWInst::BinOp::FAdd) {
+      if (Ty->isHalfTy() && STI.getSmVersion() >= 70)
+        return AtomicExpansionKind::None;
----------------
akuegel wrote:

Right, thanks for checking that. Now that I searched for it, I found it in the docs as well.
I have now added the checks

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


More information about the llvm-commits mailing list