[Mlir-commits] [mlir] [mlir][sparse] implement sparse_tensor.lvl operation. (PR #69993)
Aart Bik
llvmlistbot at llvm.org
Tue Oct 24 10:04:58 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);
----------------
aartbik wrote:
This looks correct, since this really should be the size of the "innermost" index in the tensor index expression following the iteration graph, so the level is now innermost.
I would update the comment though:
// Determine the size for access expansion (always the innermost stored level size).
Since the translation no longer happens
https://github.com/llvm/llvm-project/pull/69993
More information about the Mlir-commits
mailing list