iree
iree copied to clipboard
[Flow] Add pass to fuse encoding ops into dispatch regions after hoisting
This PR is the follow up to https://github.com/iree-org/iree/pull/18063, implementing the fusion pass to move set_encoding ops into producer dispatch regions when when the producer op is a LinalgOp. If there is no fusable producer, then the set_encoding is wrapped in a new dispatch region.
This PR also implements the ReifyRankedShapedTypeOpInterface for DispatchRegionOp, which is needed to resolve tensor dim ops after moving dynamically shaped SetEncoding ops into producer dispatch regions. The implementation simply takes the dynamic dims from the result dynamic dims of the dispatch region op.