[all-commits] [llvm/llvm-project] 9ee12f: [mlir][tensor][bufferize] Bufferize tensor.pad

Matthias Springer via All-commits all-commits at lists.llvm.org
Mon Aug 22 08:05:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ee12f47785929acaa5f71d0ae51e08f0f3acbab
      https://github.com/llvm/llvm-project/commit/9ee12f47785929acaa5f71d0ae51e08f0f3acbab
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

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

  Log Message:
  -----------
  [mlir][tensor][bufferize] Bufferize tensor.pad

tensor.pad is lowered to tensor.generate + tensor.insert_slice during bufferization. For best performance with constant padding values, users should vectorize the IR before bufferizing it.

This change also relaxes tje restriction that no new ops that bufferize to a memory write should be added during bufferization. Since bufferization has been split into two steps a while ago (tensor copy insertion + bufferization), it is reasonable to allow this now.

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




More information about the All-commits mailing list