[all-commits] [llvm/llvm-project] 0a0c7e: [mlir][tensor] Bufferize tensor.reshape with non-i...

Spenser Bauman via All-commits all-commits at lists.llvm.org
Mon Sep 18 17:50:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a0c7e89780a7b429ed8d63146c6caa2f1890e61
      https://github.com/llvm/llvm-project/commit/0a0c7e89780a7b429ed8d63146c6caa2f1890e61
  Author: Spenser Bauman <sbauman at mathworks.com>
  Date:   2023-09-19 (Tue, 19 Sep 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 tensor.reshape with non-identity layouts (#65654)

Bufferization of tensor.reshape generates a memref.reshape operation.
memref.reshape requires the source memref to have an identity layout.
The bufferization process may result in the source memref having a
non-identity layout, resulting in a verification failure.

This change causes the bufferization interface for tensor.reshape to
copy the source memref to a new buffer when the source has a
non-identity layout.




More information about the All-commits mailing list