[all-commits] [llvm/llvm-project] ea71d2: [mlir][tensor][bufferize] Reshapes: Fix memory sid...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Oct 5 05:33:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ea71d2d0fe8f172fde5b39c702cfa4dc5c3df88e
      https://github.com/llvm/llvm-project/commit/ea71d2d0fe8f172fde5b39c702cfa4dc5c3df88e
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/test/Dialect/Tensor/one-shot-bufferize.mlir

  Log Message:
  -----------
  [mlir][tensor][bufferize] Reshapes: Fix memory side effects and memory space (#68195)

* `tensor.collapse_shape` may bufferize to a memory read because the op
may have to reallocate the source buffer.
* `tensor.reshape` should not use `bufferization.clone` for
reallocation. This op has requirements wrt. the order of buffer
writes/reads. Use `memref.alloc` and `memref.copy` instead. Also fix a
bug where the memory space of the source buffer was not propagated to
the reallocated buffer.




More information about the All-commits mailing list