Skip to content

Commit d816c22

Browse files
authored
[mlir][sparse] complete migration to dim2lvl/lvl2dim in library (#69268)
This last revision completed the migration to non-permutation support in the SparseTensor library. All mappings are now controlled by the MapRef (forward and backward). Unused code has been removed, which simplifies subsequent testing of block sparsity.
1 parent 760e7d0 commit d816c22

File tree

3 files changed

+87
-308
lines changed

3 files changed

+87
-308
lines changed

mlir/include/mlir/ExecutionEngine/SparseTensor/File.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ class SparseTensorReader final {
201201
const uint64_t *lvl2dim) {
202202
const uint64_t dimRank = getRank();
203203
MapRef map(dimRank, lvlRank, dim2lvl, lvl2dim);
204-
auto *coo = readCOO<V>(map, lvlSizes);
204+
auto *lvlCOO = readCOO<V>(map, lvlSizes);
205205
auto *tensor = SparseTensorStorage<P, I, V>::newFromCOO(
206-
dimRank, getDimSizes(), lvlRank, lvlTypes, dim2lvl, lvl2dim, *coo);
207-
delete coo;
206+
dimRank, getDimSizes(), lvlRank, lvlSizes, lvlTypes, dim2lvl, lvl2dim,
207+
*lvlCOO);
208+
delete lvlCOO;
208209
return tensor;
209210
}
210211

0 commit comments

Comments
 (0)