junrushao1994 edited a comment on pull request #7919:
URL: https://github.com/apache/tvm/pull/7919#issuecomment-941683513


   @areusch There are usecases in AutoTIR where we want to call back to python 
in a multi-threaded C++ environment (with GIL). In this case, C++ threads need 
to be properly initialized by calling [several python's stable 
APIs](https://docs.python.org/3/c-api/init.html#non-python-created-threads). 
However, in fact we don't want to include `Python.h` because strictly speaking 
TVM is not designed to depend on python.
   
   Actually It's not a strict dependency, and we can completely avoid doing 
this in AutoTIR, but I'm just so curious, so TQ points me to this PR. After 
reading this, I sort of realized that this PR only works for cython cases, so 
was curious how to do it correctly using ctypes. 


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