mbaret commented on issue #4933: [Relay] Target annotation for external codegen URL: https://github.com/apache/incubator-tvm/pull/4933#issuecomment-591083262 The motivation behind merge composite was to make it so that this annotation mechanism could handle the case where there's a many-to-one mapping between Relay ops and your codegen. Merge composite resolves that many-to-one problem by ensuring all mappings are one-to-one or one-to-many. That way you could just treat composite functions equivalently to operators in the annotation pass (and partitioning pass). But just because some ops are merged does not imply they are supported, it just formats them in a way that can be easily handled in the annotation pass. It wasn't the intention to add the 'is supported' check into merge composite as it's just a structural pattern matcher. The logic in FTVMAnnotateTarget can get quite complicated and won't be expressable as a pattern. If composite functions don't get annotated as supported, they should still be valid Relay. If having them interferes with further lowering passes, then yes we'd need an 'inline composite' pass after.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
