[all-commits] [llvm/llvm-project] 3049ac: [mlir][vector] Enable transfer op hoisting with dy...

Lei Zhang via All-commits all-commits at lists.llvm.org
Sun Oct 15 16:38:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3049ac44e638c1af5177dc923f5f0675e9213d2a
      https://github.com/llvm/llvm-project/commit/3049ac44e638c1af5177dc923f5f0675e9213d2a
  Author: Lei Zhang <antiagainst at gmail.com>
  Date:   2023-10-15 (Sun, 15 Oct 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h
    M mlir/include/mlir/Dialect/Vector/IR/VectorOps.h
    M mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
    M mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
    M mlir/lib/Dialect/Vector/IR/CMakeLists.txt
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
    M mlir/test/Dialect/Linalg/hoisting.mlir
    M mlir/test/Dialect/Vector/vector-transferop-opt.mlir
    M mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][vector] Enable transfer op hoisting with dynamic indices (#68500)

Recent changes (https://github.com/llvm/llvm-project/pull/66930)
disabled vector transfer ops hoisting with view-like intermediate ops.
The recommended way is to fold subview ops into transfer op indices
before invoking hoisting. That would mean now we see transfer op indices
involving dynamic values, instead of static constant values before with
subview ops. Therefore hoisting won't kick in anymore. This breaks
downstream users.

To fix it, this commit enables hoisting transfer ops with dynamic
indices by using `ValueBoundsConstraintSet` to prove ranges are disjoint
in `isDisjointTransferIndices`. Given that utility is used in many
places including op folders, right now we introduce a flag to it and
only set as true for "heavy" transforms in hoisting and load-store
forwarding.




More information about the All-commits mailing list