[Mlir-commits] [mlir] [mlir][Vector] Support mixed mode vector.contract lowering (PR #117753)

Diego Caballero llvmlistbot at llvm.org
Tue Dec 3 15:24:23 PST 2024


dcaballe wrote:

Sorry if my comment reads critical. It was not the intent. This is a recurring issue, and I appreciate you bringing it up! Yet another half-baked thing we have in the Vector dialect and it’s probably a good time to address it. 

The main challenge lies in embedding conversion semantics for each operand within `vector.contract`, as conversions can be complex (signedness, FMF, rounding/denormal modes and what not). Regardless of the current implementation, supporting only a few conversion cases would lead to an inconsistent representation and I think we shouldn’t move towards another inconsistent intermediate state *unless* there is a clear path to a final state where full conversion semantics are supported. With this in mind, I see a couple of ways to move forward: 

1. Propose a way to encode conversion information per operand (e.g., using an attribute). This would involve translating explicit Arith/Vector conversion semantics into that embedded representation, which may or may not be worthwhile depending on what you are trying to achieve.

2. Take a step back, disallow conversions in `vector.contract` until we have a comprehensive solution and update the documentation accordingly. 

What do you think? 

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


More information about the Mlir-commits mailing list