[Mlir-commits] [mlir] [mlir][sparse] implement sparse_tensor.lvl operation. (PR #69993)

Peiming Liu llvmlistbot at llvm.org
Tue Oct 24 09:32:00 PDT 2023


================
@@ -925,9 +899,7 @@ class SparseExpandConverter : public OpConversionPattern<ExpandOp> {
     // Determine the size for access expansion (always the innermost stored
     // level size, translated back to original dimension). Note that we
     // recursively rewrite the new DimOp on the **original** tensor.
-    // FIXME: `toOrigDim` is deprecated.
-    const Dimension innerDim = toOrigDim(srcType, srcType.getLvlRank() - 1);
-    const auto sz = sizeFromTensorAtDim(rewriter, loc, desc, innerDim);
+    const auto sz = desc.getLvlSize(rewriter, loc, srcType.getLvlRank() - 1);
----------------
PeimingLiu wrote:

@aartbik Is it the right change? According to the comments, it determine the size according to the innnermost level size, but I am not sure whether it stays true for BSR

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


More information about the Mlir-commits mailing list