[Mlir-commits] [mlir] [mlir] Enhance dimOp fold (PR #187286)

Mehdi Amini llvmlistbot at llvm.org
Tue Mar 24 04:17:03 PDT 2026


joker-eph wrote:

> Main reason is the dim folding for dynamic shapes can have prohibitively large compilation costs cause we need to reuse dim of (tensor, rank) that are created, but the current logic instantiates an operation everytime it needs it. This can lead to really bad compilation times.

Seems like that does not apply to all the patterns though, only some specific cases as far as I can tell. A lot of the constant foldings don't fall into this, do they?

https://github.com/llvm/llvm-project/pull/187286


More information about the Mlir-commits mailing list