iree icon indicating copy to clipboard operation
iree copied to clipboard

[Stream] Handle tied operand result encodings in UnifyEncodingForGlobals 3/n

Open hanhanW opened this issue 2 weeks ago • 1 comments

When a dispatch has a tied operand whose encoding is being unified, the result encoding must also be updated to match (verifier requirement). Additionally, insert a re-encode op after the dispatch to convert the result back to the original encoding for downstream users.

This is a rare case that exists primarily for correctness as a safe fallback. In practice, tied operands with encodings that need unification are uncommon.

I decide to not bail out the case in the first place because it'd add much more complex to the implementation, while the fallback can be easy: just add re-encode ops. It may result in the amount of memory footprint, but it is a rare case.

It is a step towards https://github.com/iree-org/iree/issues/22485

hanhanW avatar Dec 11 '25 13:12 hanhanW

The PR depends on https://github.com/iree-org/iree/pull/22886

hanhanW avatar Dec 12 '25 09:12 hanhanW