Rationale:
Narrower types for overhead storage yield a smaller memory footprint for
sparse tensors and thus needs to be supported. Also, more value types
need to be supported to deal with all kinds of kernels. Since the
"one-size-fits-all" sparse storage scheme implementation is used
instead of actual codegen, the library needs to be able to support
all combinations of desired types. With some crafty templating and
overloading, the actual code for this is kept reasonably sized though.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for your work! It looks good to me and I only have a few minor comments.
mlir/lib/ExecutionEngine/SparseUtils.cpp | ||
---|---|---|
77 | Adds | |
84 | Sorts | |
124 | Instead of saying "unsupported", would it be more helpful to say something more specific, such as the requested the data type doesn't match how the data is stored in SparseTensorStorage? | |
159 | We probably don't need this until it needs an implementation that is different from what is in the base class. | |
184–185 | The previous word was fine. It is "pointer structure" not "pointers structure". Right? | |
206 | Similar to the above. | |
224 | This is called sparsity in class SparseTensorStorage. Why don't we call it sparsity here? |
Thanks Bixia!
mlir/lib/ExecutionEngine/SparseUtils.cpp | ||
---|---|---|
124 | I had that originally, then decided against it, but now I am convinced it is needed again ;-) |
Adds