[Mlir-commits] [mlir] [mlir][linalg] Fix getSourceSkipUnary to only skip cast-like ops (PR #198725)

Renato Golin llvmlistbot at llvm.org
Wed May 27 03:36:21 PDT 2026


rengolin wrote:

> Good point. Would restricting to the cast ops that linalg.generalize produces (extsi/extui/extf/trunci/truncf/sitofp/uitofp) be the right scope, or do you have a more specific set in mind?

Yes. Anything other than an exact match would not lead to a correct round trip. We may not have the appropriate semantics in named/category ops to allow for all casts to be applied (we discussed that at length last year but decided to postpone implementation).

The only safe thing to do is to apply exactly what semantics we do have today and leave others as future implementation once we have attributes that expose the kinds of casts we want for the named ops.

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


More information about the Mlir-commits mailing list