This is the very first step toward removing the glue and clutter from linalg and
replace it with proper sparse tensor types. This revision migrates the LinalgSparseOps
into SparseTensorOps of a sparse tensor dialect. This also provides a new home for
sparse tensor related transformation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Sparse/IR/Sparse.h | ||
---|---|---|
1 ↗ | (On Diff #341315) | Why not SparseTensor dialect? |
mlir/include/mlir/Dialect/Sparse/IR/Sparse.h | ||
---|---|---|
1 ↗ | (On Diff #341315) | do you prefer that? SGMT... |
mlir/include/mlir/Dialect/Sparse/IR/Sparse.h | ||
---|---|---|
1 ↗ | (On Diff #341315) | Just seems like a more natural fit, given that this is supposed to be a sister of the Tensor dialect right? Or does this go beyond tensors? |
mlir/include/mlir/Dialect/Sparse/IR/Sparse.h | ||
---|---|---|
1 ↗ | (On Diff #341315) | You are absolutely right. I spend too much time referring to the stuff as just "sparse", but it really should be sparse tensors. Coming up! |
Does Linalg need a dependency on the SparseTensor dialect? It would seem so from reading the code (or at least, some of the passes do).
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td | ||
---|---|---|
23–24 | Is there more you can add here? |
Did I miss something? Note that the "pass" right now lives in testing only (and will migrate to SparseTensorDialect after that).
Nicolas kindly provided me a temporary home in "Linalg", but I overstayed my welcome, so it is time to get my own home ;-)
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td | ||
---|---|---|
23–24 | next CL will remove this op completely, hence the TODO |
It seems that Linalg/Transforms/Sparsification.cpp is creating operations in the SparseTensor dialect. I don't know where that is used to know where the dependency declaration would go, I just saw the Linalg/ directory creating SparseTensor ops. If that is just in the test pass, I suppose no dependency is necessary.
Yes, apologies for the shuffling (you will see one ore two more...). With a new permanent home, things can finally move into the right place (and stay there ;-)
Sorry I had to revert in 086e0f05bfc2 because this broke the build with -DBUILD_SHARED_LIBS=ON
Is there more you can add here?