[Mlir-commits] [mlir] [mlir][sparse] code cleanup using the assumption that dim2lvl maps ar… (PR #72894)
Aart Bik
llvmlistbot at llvm.org
Mon Nov 20 09:43:14 PST 2023
================
@@ -768,16 +773,10 @@ class SparseTensorAllocConverter
return success();
}
- // Construct the dim/lvl sizes and the (unused) dim2lvl/lvl2dim buffers.
- SmallVector<Value> dimSizesValues;
+ // Level size equals to dimension size since lvl2dim map is an identity map.
SmallVector<Value> lvlSizesValues;
- Value dimSizesBuffer;
- Value dim2lvlBuffer;
- Value lvl2dimBuffer;
createDimSizes(rewriter, loc, resType, adaptor.getDynamicSizes(),
- dimSizesValues);
- genMapBuffers(rewriter, loc, resType, dimSizesValues, dimSizesBuffer,
- lvlSizesValues, dim2lvlBuffer, lvl2dimBuffer);
+ lvlSizesValues);
----------------
aartbik wrote:
Can we annotate this with
/*dimSizesValues=*/lvlSizesValues
to make it extra clear we are using that equivalence
https://github.com/llvm/llvm-project/pull/72894
More information about the Mlir-commits
mailing list