[Mlir-commits] [mlir] 152fdb8 - [OpenACC] emit NYI for multi-rank or non-memref type array reduction (#210143)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jul 16 12:47:32 PDT 2026


Author: Scott Manley
Date: 2026-07-16T14:47:27-05:00
New Revision: 152fdb8ae8725dab7e529c5cedec1d5151506307

URL: https://github.com/llvm/llvm-project/commit/152fdb8ae8725dab7e529c5cedec1d5151506307
DIFF: https://github.com/llvm/llvm-project/commit/152fdb8ae8725dab7e529c5cedec1d5151506307.diff

LOG: [OpenACC] emit NYI for multi-rank or non-memref type array reduction (#210143)

This should be an NYI and not an assertion

Added: 
    

Modified: 
    mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp b/mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
index 6e8f38698ca67..24aeed6e23bda 100644
--- a/mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+++ b/mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
@@ -3205,8 +3205,10 @@ void ACCCGToGPULowering::processAccumulateArrayOp(
 
   Value memref = mapping.lookupOrDefault(op.getMemref());
   MemRefType memrefTy = dyn_cast<MemRefType>(memref.getType());
-  assert(memrefTy && memrefTy.getRank() == 1 &&
-         "array reduction accumulate expects a rank-1 memref");
+  if (!memref)
+    (void)accSupport.emitNYI(loc, "reduction: non-MemRefTy accumulate array");
+  if (memrefTy.getRank() != 1)
+    (void)accSupport.emitNYI(loc, "reduction: multi-rank accumulate array");
 
   FailureOr<arith::AtomicRMWKind> kindOr = getReductionKind(
       op.getReductionOperator(), memrefTy.getElementType(), loc);


        


More information about the Mlir-commits mailing list