[all-commits] [llvm/llvm-project] eca6f9: [mlir][sparse][bufferization] refine bufferization...

Aart Bik via All-commits all-commits at lists.llvm.org
Tue Jun 28 09:43:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eca6f9160f1f70cf879005527cc44dee63be7793
      https://github.com/llvm/llvm-project/commit/eca6f9160f1f70cf879005527cc44dee63be7793
  Author: Aart Bik <ajcbik at google.com>
  Date:   2022-06-28 (Tue, 28 Jun 2022)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    M mlir/test/Dialect/SparseTensor/dense.mlir
    M mlir/test/Dialect/SparseTensor/sparse_1d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_2d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_3d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_affine.mlir
    M mlir/test/Dialect/SparseTensor/sparse_nd.mlir
    A mlir/test/Dialect/SparseTensor/sparse_outbuf.mlir
    M mlir/test/Dialect/SparseTensor/sparse_perm.mlir

  Log Message:
  -----------
  [mlir][sparse][bufferization] refine bufferization assumption enforcement

Enforce the assumption made on tensor buffers explicitly. When in-place,
reuse the buffer, but fill with all zeroes for the non-update case, since
the kernel assumes all elements are written to. When not in-place, zero
out the new buffer when materializing or when no-updates occur. Copy the
original tensor value when updates occur. This prepares migrating to the
new bufferization strategy, where these assumptions must be made explicit.

Reviewed By: springerm

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




More information about the All-commits mailing list