[all-commits] [llvm/llvm-project] 35ef39: [mlir][vector] ND vectors linearization pass (#81159)

Ivan Butygin via All-commits all-commits at lists.llvm.org
Tue Feb 13 04:31:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35ef3994bf738318b59ce640910fb1ccd3bb7dcb
      https://github.com/llvm/llvm-project/commit/35ef3994bf738318b59ce640910fb1ccd3bb7dcb
  Author: Ivan Butygin <ivan.butygin at gmail.com>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Dialect/Math/Transforms/LegalizeToF32.cpp
    M mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    A mlir/test/Dialect/Vector/linearize.mlir
    M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir][vector] ND vectors linearization pass (#81159)

Common backends (LLVM, SPIR-V) only supports 1D vectors, LLVM conversion
handles ND vectors (N >= 2) as `array<array<... vector>>` and SPIR-V
conversion doesn't handle them at all at the moment. Sometimes it's
preferable to treat multidim vectors as linearized 1D. Add pass to do
this. Only constants and simple elementwise ops are supported for now.

@krzysz00 I've extracted yours result type conversion code from
LegalizeToF32 and moved it to common place.

Also, add ConversionPattern class operating on traits.




More information about the All-commits mailing list