A next step towards supporting the new dimension level types and
properties. This changes properly records the properties in the
Merger, so that subsequent computations (lattice optimizations)
and code generation (during sparsification) can do the right thing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
268 | Should be a cheap copy for now. If we are supporting more property in the future, maybe a bitvector for property is better? But I am okay with it now | |
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | ||
309–311 | Why not just !isDimLevelType(tensor, i, kDense) | |
357–359 | Same here? | |
1162 | I actually prefer an enum class over enum for dimLvlType |
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
268 | Yeah, we can make that const & but that has all sort of complications with inserting in the vector while "holding" on to the reference | |
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | ||
309–311 | Because there is also undef that we want to move in the other direction | |
1162 | Okay, also note DimLvl instead of DimLevel since we had another enum of that name already ;-) |
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | ||
---|---|---|
357–359 | It may be possible here. Will clean that up when implementing. |
addressed comments, also fixed a has_value/value warning that was lingering in this file
Should be a cheap copy for now. If we are supporting more property in the future, maybe a bitvector for property is better?
But I am okay with it now