mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Split deserialize from runPythonUdf and remove generatePythonUDFResult (#34496)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/34496 Differential Revision: D20347469 Test Plan: Imported from OSS Pulled By: mrshenli fbshipit-source-id: b832a3a9e2ef61f149175f737b26f65d63bf797b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ae0c88d6aa
commit
38b2856c71
@ -102,17 +102,8 @@ std::shared_ptr<torch::jit::CompilationUnit> PythonRpcHandler::
|
||||
return jitCompilationUnit_;
|
||||
}
|
||||
|
||||
SerializedPyObj PythonRpcHandler::generatePythonUDFResult(
|
||||
const SerializedPyObj& serializedPyObj) {
|
||||
py::object PythonRpcHandler::runPythonUdf(py::object&& pythonUdf) {
|
||||
PROFILE_GIL_SCOPED_ACQUIRE;
|
||||
auto pythonUdf = deserialize(serializedPyObj);
|
||||
return serialize(pyRunFunction_(std::move(pythonUdf)));
|
||||
}
|
||||
|
||||
py::object PythonRpcHandler::runPythonUDF(
|
||||
const SerializedPyObj& serializedPyObj) {
|
||||
PROFILE_GIL_SCOPED_ACQUIRE;
|
||||
auto pythonUdf = deserialize(serializedPyObj);
|
||||
return pyRunFunction_(std::move(pythonUdf));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user