[all-commits] [llvm/llvm-project] e377a5: [MLIR][Tensor] Remove tensor.dim canonicalization ...

Vivek Khandelwal via All-commits all-commits at lists.llvm.org
Fri Apr 11 03:57:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e377a5d1682d0410b1fd38b011c29b7d81d6b53b
      https://github.com/llvm/llvm-project/commit/e377a5d1682d0410b1fd38b011c29b7d81d6b53b
  Author: Vivek Khandelwal <vivekkhandelwal1424 at gmail.com>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    M mlir/test/Dialect/Linalg/rank-reduce-contraction-ops.mlir
    M mlir/test/Dialect/Tensor/canonicalize.mlir

  Log Message:
  -----------
  [MLIR][Tensor] Remove tensor.dim canonicalization patterns registered on tensor.expand_shape/tensor.collapse_shape (#134219)

These are problematic because the iterative application that locally
resolves the tensor.dim operation introduces
intermediate floor_div, which is losing the information about the exact
division that was carried out in the original
IR, and the iterative algorithm can't converge towards the simplest
form.
Information loss is not acceptable for canonicalization.

Resolving the dimOp can be achieved through
resolve-ranked-shaped-type-result-dims and
resolve-shaped-type-result-dims passes.

---------

Signed-off-by: Vivek Khandelwal <vivekkhandelwal1424 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