[all-commits] [llvm/llvm-project] c7b117: [mlir][linalg] Make Linalg vectorizer lower affine...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Jan 27 00:31:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7b1176e9afbfcc3da9482abbf7c1eb8793ff254
      https://github.com/llvm/llvm-project/commit/c7b1176e9afbfcc3da9482abbf7c1eb8793ff254
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/test/Dialect/Linalg/vectorization.mlir

  Log Message:
  -----------
  [mlir][linalg] Make Linalg vectorizer lower affine.apply

It is possible that the input to the Linalg vectorizer contains
`affine.apply` ops (see the example in [1]). Such operations are not
vectarizable at the moment, but this can be fixed by simply converting
them to arithmetic operations. This is basically what this patch
introduces.

The IR change enabled in this patch could be part of a larger set of
"linalgOp pre-processing" transformations that happens right before
vectorization starts but after we know we can vectorize the op. I am
leaving this as a TODO.

[1] https://github.com/iree-org/iree/issues/10876.

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




More information about the All-commits mailing list