[Mlir-commits] [mlir] 9a8cab8 - [mlir][sparse] adjust output tensor to synthetic tensor

Aart Bik llvmlistbot at llvm.org
Mon Dec 21 14:14:05 PST 2020


Author: Aart Bik
Date: 2020-12-21T14:13:54-08:00
New Revision: 9a8cab8bacc12d48d74249d868082effe132029e

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

LOG: [mlir][sparse] adjust output tensor to synthetic tensor

Fixes a merge conflict with previous two CLs.

Reviewed By: mravishankar

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

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp b/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
index eb940d0f769b..a6b7277e47e3 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
@@ -466,8 +466,8 @@ static unsigned buildLattices(Merger &merger, linalg::GenericOp op,
     // set to the undefined index in that dimension. An invariant expression
     // is set to a synthetic tensor with undefined indices only.
     unsigned s = merger.addSet();
-    unsigned t = kind == Kind::kTensor ? merger.exp(exp).e0
-                                       : op.getNumShapedOperands() - 1;
+    unsigned t =
+        kind == Kind::kTensor ? merger.exp(exp).e0 : op.getNumShapedOperands();
     merger.set(s).push_back(merger.addLat(t, idx, exp));
     return s;
   }


        


More information about the Mlir-commits mailing list