[Mlir-commits] [mlir] [mlir][tosa] Fold tensor.cast into tosa.transpose (PR #170029)

Luke Hutton llvmlistbot at llvm.org
Mon Dec 8 03:30:31 PST 2025


lhutton1 wrote:

Thanks for the context @recursion-man! I'm not sure what the best approach for this situation would be, perhaps this is worth raising as a question in the discuss forum: https://discourse.llvm.org/c/mlir/31, where some more experienced contributors may be able to help. A couple of suggestions I have in the meantime might be:
- Check if tiling can produce an output that doesn't have a cast to dynamic shape at the end. (I'm not sure what the expected behaviour of this transformation should be)
- Relax the verifier checks on your `custom.add` op. Allow a mix of static and dynamic shapes in the verifier. Then separately, later in your pipeline, run a pass to verify all inputs are static and have the same shape. In TOSA, we take this approach to allow incremental lowering. The `--tosa-validation` pass currently checks operations have static shapes.

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


More information about the Mlir-commits mailing list