[Mlir-commits] [mlir] [mlir][sparse] first proof-of-concept non-permutation rewriter (PR #70863)

Peiming Liu llvmlistbot at llvm.org
Tue Oct 31 14:59:28 PDT 2023


================
@@ -18,10 +20,135 @@ using namespace mlir::sparse_tensor;
 
 namespace {
 
-// TODO:
-//   (1) insert the zero-cost sparse_tensor.reinterpret_map ops
-//   (2) rewrite linalg.generic ops traits on level crds
-//   (3) compute topsort, and resolve cyles with sparse_tensor.convert ops
+//===----------------------------------------------------------------------===//
+// Helper methods.
+//===----------------------------------------------------------------------===//
+
+// Translates a "simple" map according to an identify lvl-map.
+static AffineMap translateMap(OpBuilder &builder, SparseTensorType stt,
----------------
PeimingLiu wrote:

nit: I don't think you need `static` here as it is already inside an anonymous namespace

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


More information about the Mlir-commits mailing list