mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Remove _load_return_value from RPC internal.py (#34492)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/34492 Differential Revision: D20347468 Test Plan: Imported from OSS Pulled By: mrshenli fbshipit-source-id: 92388d0d50a08fb895bacacf94c7b5495b4ae2b6
This commit is contained in:
committed by
Facebook Github Bot
parent
6d1c4df660
commit
18ef09f5ac
@ -128,8 +128,11 @@ py::object PyRRef::toHere() {
|
||||
if (rref_->isPyObj()) {
|
||||
// python_rpc_handler deserialization will acquires GIL.
|
||||
auto rfr_values = value.toTuple()->elements();
|
||||
return PythonRpcHandler::getInstance().deserialize(
|
||||
auto& pythonRpcHandler = PythonRpcHandler::getInstance();
|
||||
auto ret = pythonRpcHandler.deserialize(
|
||||
SerializedPyObj::fromIValues(rfr_values));
|
||||
pythonRpcHandler.handleException(ret);
|
||||
return ret;
|
||||
} else {
|
||||
// acquiring GIL as torch::jit::toPyObject creates new py::object
|
||||
// without grabbing the GIL.
|
||||
|
Reference in New Issue
Block a user