[all-commits] [llvm/llvm-project] 279881: [MLIR] Fix incorrect slice contiguity inference in...

Momchil Velikov via All-commits all-commits at lists.llvm.org
Mon Jun 23 02:11:14 PDT 2025


  Branch: refs/heads/users/momchil-velikov/memref-contig-slice
  Home:   https://github.com/llvm/llvm-project
  Commit: 2798815d1659bc8bc55bdd4dd1e10333c9c59202
      https://github.com/llvm/llvm-project/commit/2798815d1659bc8bc55bdd4dd1e10333c9c59202
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [MLIR] Fix incorrect slice contiguity inference in `vector::isContiguousSlice`

Previously, slices were sometimes marked as non-contiguous when
they were actually contiguous. This occurred when the vector type had
leading unit dimensions, e.g., `vector<1x1x...x1xd0xd1x...xdn-1xT>``.
In such cases, only the trailing n dimensions of the memref need to be
contiguous, not the entire vector rank.

This affects how `FlattenContiguousRowMajorTransfer{Read,Write}Pattern`
flattens `transfer_read` and `transfer_write`` ops. The pattern used
to collapse a number of dimensions equal the vector rank, which
may be is incorrect when leading dimensions are unit-sized.

This patch fixes the issue by collapsing only as many trailing memref
dimensions as are actually contiguous.


  Commit: 36a692612475ea6bf21f8e4ad4eaed3b1fea4e96
      https://github.com/llvm/llvm-project/commit/36a692612475ea6bf21f8e4ad4eaed3b1fea4e96
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp

  Log Message:
  -----------
  [fixup] Don't try to collapse non-leftmost dynamic dimension

Even though it's possible in principle, the affected patterns need
strides to be determined statically.


  Commit: 0720f87e2646124298a04887c1eb464b8f102c25
      https://github.com/llvm/llvm-project/commit/0720f87e2646124298a04887c1eb464b8f102c25
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [fixup] Update a member functon name and fix a test failure


  Commit: 97d2a5faf93fe6a13d4e5a0663f034be6dd7bbcd
      https://github.com/llvm/llvm-project/commit/97d2a5faf93fe6a13d4e5a0663f034be6dd7bbcd
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp

  Log Message:
  -----------
  [fixup] One more rename


  Commit: dc05e13cf05374c5523640e7ddd2cf38bf656c75
      https://github.com/llvm/llvm-project/commit/dc05e13cf05374c5523640e7ddd2cf38bf656c75
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp

  Log Message:
  -----------
  [fixup] Comment fixes


  Commit: 25f7bdd0ac47d6cee75c067eff991af9e4b5e4a5
      https://github.com/llvm/llvm-project/commit/25f7bdd0ac47d6cee75c067eff991af9e4b5e4a5
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [fixup] Test tweaks for better coverage


  Commit: 9fdb00c627b17d38060954b0f645cad40df22073
      https://github.com/llvm/llvm-project/commit/9fdb00c627b17d38060954b0f645cad40df22073
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [fixup] Do minimal collapsing of the memref


  Commit: 4a1b0efad7fd22f84eff85eebd787502192d14df
      https://github.com/llvm/llvm-project/commit/4a1b0efad7fd22f84eff85eebd787502192d14df
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h
    M mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [fixup] Misc comments


  Commit: 1740d45de6d3d4af83891d3804c9b3eba0a26415
      https://github.com/llvm/llvm-project/commit/1740d45de6d3d4af83891d3804c9b3eba0a26415
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-23 (Mon, 23 Jun 2025)

  Changed paths:
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir

  Log Message:
  -----------
  [fixup] Add/change a few tests


Compare: https://github.com/llvm/llvm-project/compare/358f5daed351...1740d45de6d3

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