Lunderberg commented on issue #17210:
URL: https://github.com/apache/tvm/issues/17210#issuecomment-2254553248

   Looks like it is a bug in TVM.  The `CompositeGroupBuilder` is only called 
for the `"main"` function, but the later `MakeGroupedFunctions` is run on all 
Relax functions in the module.  As a result, information about variables in the 
`"main2"` function is absent, which raises an error.
   
   I don't have a fix at the moment, but it should be to have both the 
`CompositeGroupBuilder` and the `MakeGroupedFunctions` steps operate on the 
exact same list of functions.  While the crash itself could be avoided by 
passing `{"main"}` to `MakeGroupedFunctions`, that still wouldn't have the 
correct behavior for modules that have multiple Relax functions.  (Or have 
their main function named something other than `"main"`.)  Instead, we should 
collect all Relax functions in the module that have neither the `kComposite` 
nor the `kCodegen` attributes, and then run both `CompositeGroupBuilder` and 
`MakeGroupedFunctions` across that list of functions.


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