masahi commented on PR #14097:
URL: https://github.com/apache/tvm/pull/14097#issuecomment-1446090660

   Thanks for the discussion, I think we shouldn't push all responsibilities to 
codegen and call it "a more general solution". At least for the cases where 
there is a one-to-one mapping between a composite function and an op, clearly 
there is one "right" function signature. So each backend shouldn't need to 
worry about `add` or other trivial functions possibly having multiple 
signatures. For more complicated, "truly fused" composite functions that are 
meant to be consumed by library-based BYOC (dnnl, cutlass), I think it is 
reasonable to ask codegen to handle the signature problem. 
   
   I liked @yelite suggestion of leaving the current op fusion impl as is, and 
instead adding a standalone pass that would identify such trivial composite 
functions (the one that merely wraps an op, e.g. `tensorrt.add`) and fix up 
their signature if necessary. Later we may extend that pass to support the 
`fused_permute_matmul` case - convert the signature into more "natural" one 
based on the anchor op call site. 
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to