[all-commits] [llvm/llvm-project] 9aa505: Introduce `tensor.pack` and `tensor.unpack` operat...

lorenzo chelini via All-commits all-commits at lists.llvm.org
Tue Nov 22 00:12:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9aa505a28d827f13ac9c6268f5834592b1a150e3
      https://github.com/llvm/llvm-project/commit/9aa505a28d827f13ac9c6268f5834592b1a150e3
  Author: Lorenzo Chelini <l.chelini at icloud.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Tensor/invalid.mlir
    M mlir/test/Dialect/Tensor/ops.mlir
    M mlir/test/Transforms/loop-invariant-code-motion.mlir

  Log Message:
  -----------
  Introduce `tensor.pack` and `tensor.unpack` operations

Pack and Unpack return new tensors within which the individual elements
are reshuffled according to the packing specification. This has the
consequence of modifying the canonical order in which a given operator
(i.e., Matmul) accesses the individual elements. After bufferization,
this typically translates to increased access locality and cache
behavior improvement, e.g., eliminating cache line splitting.

Co-authored-by: Mahesh Ravishankar <ravishankarm at google.com>
Co-authored-by: Han-Chung Wang <hanchung at google.com>

RFC: https://discourse.llvm.org/t/rfc-tensor-pack-and-tensor-unpack/66408/1

Reviewed By: nicolasvasilache, rengolin, hanchung

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




More information about the All-commits mailing list