[flang-commits] [flang] [flang] Add reductions for CUF Kernels: Lowering (PR #95184)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Jun 11 17:47:58 PDT 2024


================
@@ -2771,8 +2800,9 @@ class FirConverter : public Fortran::lower::AbstractConverter {
         loopEval = &*std::next(loopEval->getNestedEvaluations().begin());
     }
 
-    auto op = builder->create<cuf::KernelOp>(loc, gridValues, blockValues,
-                                             streamValue, lbs, ubs, steps, n);
+    auto op = builder->create<cuf::KernelOp>(
+        loc, gridValues, blockValues, streamValue, lbs, ubs, steps, n,
+        mlir::ValueRange(reduceOperands), builder->getArrayAttr(reduceAttrs));
----------------
clementval wrote:

Do you need the `mlir::ValueRange` here? It should know how to convert SmallVector to ValueRange. 

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


More information about the flang-commits mailing list