[all-commits] [llvm/llvm-project] c0a631: [mlir][tensor] Add tensor.dim operation

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Jun 30 18:09:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0a6318d96344b475eec1229b664dd04b569a375
      https://github.com/llvm/llvm-project/commit/c0a6318d96344b475eec1229b664dd04b569a375
  Author: Matthias Springer <springerm at google.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Dialect/MemRef/IR/MemRef.h
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td
    M mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/include/mlir/Dialect/Tensor/Transforms/Passes.td
    M mlir/lib/Conversion/ShapeToStandard/CMakeLists.txt
    M mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Conversion/TosaToLinalg/CMakeLists.txt
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
    M mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/lib/Dialect/MemRef/Transforms/ResolveShapedTypeResultDims.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    M mlir/lib/Dialect/StandardOps/Transforms/Bufferize.cpp
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
    M mlir/lib/Dialect/Tensor/Transforms/PassDetail.h
    M mlir/lib/Dialect/Vector/VectorTransforms.cpp
    M mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
    M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
    M mlir/test/Dialect/Linalg/bufferize.mlir
    M mlir/test/Dialect/Linalg/canonicalize.mlir
    M mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir
    M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    M mlir/test/Dialect/Linalg/fusion-elementwise-options.mlir
    M mlir/test/Dialect/Linalg/fusion-sequence.mlir
    M mlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
    M mlir/test/Dialect/Linalg/fusion-tensor.mlir
    M mlir/test/Dialect/Linalg/hoist-padding.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/roundtrip.mlir
    M mlir/test/Dialect/Linalg/subtensor-of-padtensor.mlir
    M mlir/test/Dialect/Linalg/tile-and-fuse-tensors.mlir
    M mlir/test/Dialect/Linalg/tile-tensors.mlir
    M mlir/test/Dialect/Linalg/vectorization.mlir
    M mlir/test/Dialect/MemRef/canonicalize.mlir
    M mlir/test/Dialect/SparseTensor/conversion.mlir
    M mlir/test/Dialect/SparseTensor/sparse_1d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_2d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_3d.mlir
    M mlir/test/Dialect/Standard/bufferize.mlir
    M mlir/test/Dialect/Tensor/bufferize.mlir
    M mlir/test/Dialect/Tensor/canonicalize.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Interfaces/InferShapedTypeOpInterface/resolve-shaped-type-result-dims.mlir
    M mlir/test/Transforms/canonicalize.mlir
    M mlir/test/Transforms/constant-fold.mlir
    M mlir/test/Transforms/pipeline-data-transfer.mlir
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir][tensor] Add tensor.dim operation

* Split memref.dim into two operations: memref.dim and tensor.dim. Both ops have the same builder interface and op argument names, so that they can be used with templates in patterns that apply to both tensors and memrefs (e.g., some patterns in Linalg).
* Add constant materializer to TensorDialect (needed for folding in affine.apply etc.).
* Remove some MemRefDialect dependencies, make some explicit.

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




More information about the All-commits mailing list