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

Momchil Velikov via All-commits all-commits at lists.llvm.org
Fri Jun 6 06:02:31 PDT 2025


  Branch: refs/heads/users/momchil-velikov/memref-contig-slice
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c1207b4f72314683eed7d5f8672c6d83db1ef54
      https://github.com/llvm/llvm-project/commit/4c1207b4f72314683eed7d5f8672c6d83db1ef54
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-06 (Fri, 06 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: e3ccb4f4df4c4c88acb49e5441dc3b12680d65fb
      https://github.com/llvm/llvm-project/commit/e3ccb4f4df4c4c88acb49e5441dc3b12680d65fb
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-06 (Fri, 06 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: 70c6d65d3b5bd26338e78479e0772d56ce9d0cf4
      https://github.com/llvm/llvm-project/commit/70c6d65d3b5bd26338e78479e0772d56ce9d0cf4
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-06 (Fri, 06 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: 9dcb594022fd1036c5ecd84949a7f16764be90ca
      https://github.com/llvm/llvm-project/commit/9dcb594022fd1036c5ecd84949a7f16764be90ca
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-06 (Fri, 06 Jun 2025)

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

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


  Commit: f60e73d376a9f2117c2945f9c096d669e4544e47
      https://github.com/llvm/llvm-project/commit/f60e73d376a9f2117c2945f9c096d669e4544e47
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2025-06-06 (Fri, 06 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


Compare: https://github.com/llvm/llvm-project/compare/21266b037f10...f60e73d376a9

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