[all-commits] [llvm/llvm-project] 3bd82f: [mlir][sparse] compute allocation size_hint

Aart Bik via All-commits all-commits at lists.llvm.org
Mon Feb 6 14:09:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3bd82f30dcc25533de1ff900a704efa77a6951da
      https://github.com/llvm/llvm-project/commit/3bd82f30dcc25533de1ff900a704efa77a6951da
  Author: Aart Bik <ajcbik at google.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

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

  Log Message:
  -----------
  [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




More information about the All-commits mailing list