[all-commits] [llvm/llvm-project] 786cbb: Re-apply "[mlir][MemRefToLLVM] Remove the code for...

qcolombet via All-commits all-commits at lists.llvm.org
Fri Dec 2 07:33:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 786cbb09edf2e4b6b057351444720e96c6dd2066
      https://github.com/llvm/llvm-project/commit/786cbb09edf2e4b6b057351444720e96c6dd2066
  Author: Quentin Colombet <quentin.colombet at gmail.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
    A mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
    M mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-one-shot-bufferize.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
    M mlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir

  Log Message:
  -----------
  Re-apply "[mlir][MemRefToLLVM] Remove the code for lowering subview"

This reverts commit d0650d108929985760d536d59e9927838dccc9b8.

Original commit message:
Subviews are supposed to be expanded before we hit the lowering
code.
The expansion is done with the pass called
expand-strided-metadata.

Add a test that demonstrate how these passes can be linked up to achieve
the desired lowering.

This patch is NFC in spirit but not in practice because `subview` gets
lowered into `reinterpret_cast(extract_strided_metadata, <some math>)`
which lowers in two memref descriptors (one for `reinterpert_cast` and
one for `extract_strided_metadata`), which creates some noise of the
form: `extractvalue(unrealized_cast(extractvalue[0]))[0]` that is
currently not simplified within MLIR but that is really just noop in
that case.

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




More information about the All-commits mailing list