[all-commits] [llvm/llvm-project] 09dfb4: [mlir][tensor][bufferize] Support memory_space for...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Oct 27 03:31:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09dfb44193973db76f33e6518b83e53a762cfb34
      https://github.com/llvm/llvm-project/commit/09dfb44193973db76f33e6518b83e53a762cfb34
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    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] Support memory_space for tensor.pad

This change adds memory space support to tensor.pad. (tensor.generate and tensor.from_elements do not support memory spaces yet.)

The memory space is inferred from the buffer of the source tensor.

Instead of lowering tensor.pad to tensor.generate + tensor.insert_slice, it is now lowered to bufferization.alloc_tensor (with the correct memory space) + linalg.map + tensor.insert_slice.

Memory space support for the remaining two tensor ops is left for a later point, as this requires some more design discussions.

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




More information about the All-commits mailing list