[all-commits] [llvm/llvm-project] b78b54: [mlir][sparse] Avoid values buffer reallocation fo...

Bixia Zheng via All-commits all-commits at lists.llvm.org
Wed Jan 11 16:31:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b78b547371253118b7ab04a12653c66878466d2b
      https://github.com/llvm/llvm-project/commit/b78b547371253118b7ab04a12653c66878466d2b
  Author: bixia1 <bixia at google.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
    M mlir/test/Dialect/SparseTensor/codegen.mlir

  Log Message:
  -----------
  [mlir][sparse] Avoid values buffer reallocation for annotated all dense tensors.

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.

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D141516




More information about the All-commits mailing list