[mlir][sparse] add convenience method for sparse tensor setup
authorAart Bik <ajcbik@google.com>
Fri, 3 Sep 2021 18:23:38 +0000 (11:23 -0700)
committerAart Bik <ajcbik@google.com>
Fri, 3 Sep 2021 20:35:59 +0000 (13:35 -0700)
commiteee1f1c8fb0242de4eac53867b4446052e3bb8d3
tree06304419d65c52d9a781c18bd963ea913c59056b
parentd364eccdd5a924d34284dca47ed8b029507167ce
[mlir][sparse] add convenience method for sparse tensor setup

This simplifies setting up sparse tensors through C-style data structures.
Useful for runtimes that want to interact with MLIR-generated code
without knowning about all bufferization details (viz. memrefs).

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D109251
mlir/lib/ExecutionEngine/SparseUtils.cpp