[all-commits] [llvm/llvm-project] 97069a: [MLIR] Generalize expand_shape to take shape as ex...

Gaurav Shukla via All-commits all-commits at lists.llvm.org
Tue Apr 30 09:28:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97069a86193a617a9e4cf742a29db6116b2bf449
      https://github.com/llvm/llvm-project/commit/97069a86193a617a9e4cf742a29db6116b2bf449
  Author: Gaurav Shukla <gaurav at nod-labs.com>
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/Utils/Utils.h
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h
    M mlir/include/mlir/Dialect/Utils/StaticValueUtils.h
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    M mlir/lib/Dialect/Arith/Utils/CMakeLists.txt
    M mlir/lib/Dialect/Arith/Utils/Utils.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
    M mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
    M mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
    M mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/SplitReduction.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/lib/Dialect/Tensor/Transforms/PackAndUnpackPatterns.cpp
    M mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
    M mlir/lib/Dialect/Utils/StaticValueUtils.cpp
    M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
    M mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
    M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
    M mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-empty-tensor-elimination.mlir
    M mlir/test/Dialect/Linalg/bubble-up-extract-slice-op.mlir
    M mlir/test/Dialect/Linalg/collapse-dim.mlir
    M mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir
    M mlir/test/Dialect/Linalg/data-layout-propagation.mlir
    M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    M mlir/test/Dialect/Linalg/flatten-elementwise.mlir
    M mlir/test/Dialect/Linalg/fuse-with-reshape-by-collapsing.mlir
    M mlir/test/Dialect/Linalg/fusion-push-reshape.mlir
    M mlir/test/Dialect/Linalg/reshape_control_fusion.mlir
    M mlir/test/Dialect/Linalg/reshape_fusion.mlir
    M mlir/test/Dialect/Linalg/resolve-shaped-type-result-dims.mlir
    M mlir/test/Dialect/Linalg/transform-op-split-reduction.mlir
    M mlir/test/Dialect/Linalg/vectorization-with-patterns.mlir
    M mlir/test/Dialect/MemRef/canonicalize.mlir
    M mlir/test/Dialect/MemRef/expand-strided-metadata.mlir
    M mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
    M mlir/test/Dialect/MemRef/invalid.mlir
    M mlir/test/Dialect/MemRef/ops.mlir
    M mlir/test/Dialect/MemRef/runtime-verification.mlir
    M mlir/test/Dialect/SparseTensor/sparse_reshape.mlir
    M mlir/test/Dialect/Tensor/bufferize.mlir
    M mlir/test/Dialect/Tensor/canonicalize.mlir
    M mlir/test/Dialect/Tensor/fold-empty-op.mlir
    M mlir/test/Dialect/Tensor/fold-reassociative-reshapes.mlir
    M mlir/test/Dialect/Tensor/invalid.mlir
    M mlir/test/Dialect/Tensor/ops.mlir
    M mlir/test/Dialect/Tensor/simplify-pack-unpack.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [MLIR] Generalize expand_shape to take shape as explicit input (#90040)

This patch generalizes tensor.expand_shape and memref.expand_shape to
consume the output shape as a list of SSA values. This enables us to
implement generic reshape operations with dynamic shapes using
collapse_shape/expand_shape pairs.

The output_shape input to expand_shape follows the static/dynamic
representation that's also used in `tensor.extract_slice`.

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

---------

Signed-off-by: Gaurav Shukla<gaurav.shukla at amd.com>
Signed-off-by: Gaurav Shukla <gaurav.shukla at amd.com>
Co-authored-by: Ramiro Leal-Cavazos <ramiroleal050 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list