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

   Prior to this commit, if device initialization is required, the AOT main 
function produced a `call_extern()` that included the device context as input.  
This commit updates the AOT main function to provide the device context only if 
the function being called accepts a device context as input.
   
   If an extra device context argument is included at the call site, the C 
codegen would produce a function signature that includes the device context for 
the caller's compilation unit, but a signature without the device context for 
the callee's compilation unit.  While this can compile and run in some cases, 
it is undefined behavior for the signature to vary between compilation units, 
and should be avoided.
   
   This was initially discovered while debugging 
https://github.com/apache/tvm/pull/14985, in which changes to the lowering flow 
resulted in the caller and callee being within the same compilation unit.


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