[all-commits] [llvm/llvm-project] 9621c1: [mlir][linalg] Fix vectorization bug in vector tra...

Thomas via All-commits all-commits at lists.llvm.org
Mon May 3 12:17:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9621c1ef56c568ffe2db903af2f61137a4453430
      https://github.com/llvm/llvm-project/commit/9621c1ef56c568ffe2db903af2f61137a4453430
  Author: thomasraoux <thomasraoux at google.com>
  Date:   2021-05-03 (Mon, 03 May 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/VectorOps.td
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/lib/Dialect/Vector/VectorOps.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/test/Dialect/Linalg/vectorization.mlir

  Log Message:
  -----------
  [mlir][linalg] Fix vectorization bug in vector transfer indexing map calculation

The current implementation had a bug as it was relying on the target vector
dimension sizes to calculate where to insert broadcast. If several dimensions
have the same size we may insert the broadcast on the wrong dimension. The
correct broadcast cannot be inferred from the type of the source and
destination vector.

Instead when we want to extend transfer ops we calculate an "inverse" map to the
projected permutation and insert broadcast in place of the projected dimensions.

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




More information about the All-commits mailing list