[mlir][sparse] Refactoring: abstract sparse tensor memory scheme into a SparseTensorD...
authorPeiming Liu <peiming@google.com>
Thu, 24 Nov 2022 00:42:43 +0000 (00:42 +0000)
committerPeiming Liu <peiming@google.com>
Mon, 5 Dec 2022 22:11:53 +0000 (22:11 +0000)
commit8a7e69d145ff72e7e4fc10ce6b81c3aa4794201c
tree32bedf958b1430adfc22bf1cfd522a8748a8ebae
parent0d03ba62c55f5fc1edf28ccffe9dd4ffa3edd4d0
[mlir][sparse] Refactoring: abstract sparse tensor memory scheme into a SparseTensorDescriptor class.

This patch abstracts sparse tensor memory scheme into a SparseTensorDescriptor class. Previously, the field accesses are performed in a relatively error-prone way, this patch hides the hairy details behind a SparseTensorDescriptor class to allow users access sparse tensor fields in a more cohesive way.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D138627
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp