areusch edited a comment on pull request #7919: URL: https://github.com/apache/tvm/pull/7919#issuecomment-943495292
@junrushao1994 ok, if you want to do this i'd strongly encourage you to consider whether it's worth the complexity of multi-threading in c++ (it certainly could be, but the GIL is a pretty easy way to nix any threading benefits :) and Python can quickly destroy any cache locality you may have leveraged in multi-threaded apps). i am guessing you want to call `PyMem_RawMalloc`? I do see in the [docs](https://docs.python.org/3/c-api/memory.html#raw-memory-interface): > The following function sets are wrappers to the system allocator. These functions are thread-safe, the GIL does not need to be held. does your question still apply to this specific use case? in general, this callback function, although named due to Python, isn't so specific to Python and is more specific to syscall restart behavior and signal processing. -- 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: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org