[mlir][sparse] add lvlToDim field to sparse tensor encoding (#67194)
commit836411b99fa3823375e8de8a866faf89da9234c0
authorAart Bik <39774503+aartbik@users.noreply.github.com>
Fri, 22 Sep 2023 22:51:25 +0000 (22 15:51 -0700)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2023 22:51:25 +0000 (22 15:51 -0700)
tree3dd1cb86599dd344c3060ec888f05ce02db91563
parent8ea74302007465e4e824d420b103c2d23bd5838b
[mlir][sparse] add lvlToDim field to sparse tensor encoding (#67194)

Note the new surface syntax allows for defining a dimToLvl and lvlToDim
map at once (where usually the latter can be inferred from the former,
but not always). This revision adds storage for the latter, together
with some intial boilerplate. The actual support (inference, validation,
printing, etc.) is still TBD of course.
mlir/include/mlir-c/Dialect/SparseTensor.h
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h
mlir/lib/Bindings/Python/DialectSparseTensor.cpp
mlir/lib/CAPI/Dialect/SparseTensor.cpp
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
mlir/test/CAPI/sparse_tensor.c