[mlir][sparse] compute allocation size_hint
This adds the hint to a number of tensor allocations in codegens, shaving off quite some time from e.g. reading in sparse matrices due to zero-reallocation scheme. Note that we can probably provide hints on all allocations, and refine the heuristics that use them for general tensors. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D143309
Loading
Please sign in to comment