[Mlir-commits] [mlir] c6fa2ef - [mlir][Linalg] Fix build failure from D80188

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed May 27 13:07:12 PDT 2020


Author: MaheshRavishankar
Date: 2020-05-27T13:06:43-07:00
New Revision: c6fa2efd481a58c979a8e9f95119b4278b13d99a

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

LOG: [mlir][Linalg] Fix build failure from D80188

Differential Revision: https://reviews.llvm.org/D80657

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Utils/Utils.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
index cd8b17650bb1..c48b87aaa4e4 100644
--- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -129,25 +129,29 @@ template struct mlir::linalg::GenerateLoopNest<scf::ForOp>;
 template struct mlir::linalg::GenerateLoopNest<scf::ParallelOp>;
 template struct mlir::linalg::GenerateLoopNest<AffineForOp>;
 
+namespace mlir {
+namespace linalg {
 /// Specialization of loop nest generator for scf.parallel loops to handle
 /// iterator types that are not parallel. These are generated as sequential
 /// loops.
 template <>
-void mlir::linalg::GenerateLoopNest<scf::ForOp>::doit(
-    MutableArrayRef<Value> allIvs, ArrayRef<SubViewOp::Range> loopRanges,
-    ArrayRef<Attribute> iteratorTypes, std::function<void(void)> fun) {
+void GenerateLoopNest<scf::ForOp>::doit(MutableArrayRef<Value> allIvs,
+                                        ArrayRef<SubViewOp::Range> loopRanges,
+                                        ArrayRef<Attribute> iteratorTypes,
+                                        std::function<void(void)> fun) {
   edsc::GenericLoopNestRangeBuilder<scf::ForOp>(allIvs, loopRanges)(fun);
 }
 
 template <>
-void mlir::linalg::GenerateLoopNest<AffineForOp>::doit(
-    MutableArrayRef<Value> allIvs, ArrayRef<SubViewOp::Range> loopRanges,
-    ArrayRef<Attribute> iteratorTypes, std::function<void(void)> fun) {
+void GenerateLoopNest<AffineForOp>::doit(MutableArrayRef<Value> allIvs,
+                                         ArrayRef<SubViewOp::Range> loopRanges,
+                                         ArrayRef<Attribute> iteratorTypes,
+                                         std::function<void(void)> fun) {
   edsc::GenericLoopNestRangeBuilder<AffineForOp>(allIvs, loopRanges)(fun);
 }
 
 template <>
-void mlir::linalg::GenerateLoopNest<scf::ParallelOp>::doit(
+void GenerateLoopNest<scf::ParallelOp>::doit(
     MutableArrayRef<Value> allIvs, ArrayRef<SubViewOp::Range> loopRanges,
     ArrayRef<Attribute> iteratorTypes, std::function<void(void)> fun) {
   // Check if there is nothing to do here. This is also the recursion
@@ -190,3 +194,5 @@ void mlir::linalg::GenerateLoopNest<scf::ParallelOp>::doit(
       allIvs.take_front(nOuterPar), loopRanges.take_front(nOuterPar),
       iteratorTypes.take_front(nOuterPar), nestedFn);
 }
+} // namespace linalg
+} // namespace mlir


        


More information about the Mlir-commits mailing list