[all-commits] [llvm/llvm-project] 544374: [mlir][Linalg] Add a transform.structured.pack ope...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Tue Jan 17 05:25:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5443743ca1874acfe2d5654fedd4a0c0bed6777e
      https://github.com/llvm/llvm-project/commit/5443743ca1874acfe2d5654fedd4a0c0bed6777e
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    A mlir/test/Dialect/Linalg/transform-op-pack.mlir

  Log Message:
  -----------
  [mlir][Linalg] Add a transform.structured.pack operation

This revision introduces a `transform.structured.pack` operation to
transform any Linalg operation to a higher-dimensional Linalg operation on
packed operands.

`tensor.pack` (resp. `tensor.unpack`) operations are inserted for the operands
(resp. results) that need to be packed (resp. unpacked) according to the
`packed_sizes` specification.

At the moment, the packing operation always pads with `getZeroAttr` which will
need to be adjusted depending on the consumers.

Packing is limited to those dimensions that are indexed only by AffineDimExpr.
Packing more advanced indexings requires modular arithmetic that is outside the
scoped of a `linalg.generic` at the moment.

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




More information about the All-commits mailing list