Previously, we rely on the InsertOp to gradually increase the size of the
storage for all sparse tensors. We now allocate the full size values buffer
for annotated all dense tensors when we first allocate the tensor. This avoids
the cost of gradually increasing the buffer and allows accessing the values
buffer as if it were a dense tensor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp | ||
---|---|---|
244–247 | LG, but you can probably do the same optimization for idxMemRef at the last level, right? |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp | ||
---|---|---|
244–247 | NVM, you are doing this for all dense tensors. Probably we should extend the alloc tensor to take some heuristic, there are many time when the NNZ can be computed. |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp | ||
---|---|---|
244–247 | Right, there is already a TODO in the code for improving the heuristic. |
LG, but you can probably do the same optimization for idxMemRef at the last level, right?