Lunderberg opened a new pull request, #17216:
URL: https://github.com/apache/tvm/pull/17216

   Prior to this commit, the Relax type produced by calling a TIR PrimFunc 
needed to be explicitly specified using the `out_sinfo` argument.  These output 
shapes are required in order to allocate output tensors during the 
`CallTIRRewrite` lowering pass.  However, specifying them explicitly, 
especially in hand-written functions, duplicates information that is already 
present in the `PrimFunc` signature, and introduces the potential for 
inconsistencies.
   
   This commit updates the `MakeCallTIR` function to infer `out_sinfo` if not 
explicitly specified.  This inference uses the number of relax arguments to 
identify output parameters in the signature of the `PrimFunc`, which then 
become the return values from `R.call_tir`.  Currently, this inference of 
`out_sinfo` occurs when constructing the `relax::Call` object, after which the 
`out_sinfo` is always present in the Relax IR.


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