If you don't want to block the current thread or take the risk of a // GIL deadlock, you can use an asynchronous calling mechanism like std::async. std::string NCCLTraceBuffer::Entry::getTraceback() { torch::CapturedTraceback* traceback = traceback_.get(); torch::SymbolizedTraceback...