提交 8b585c76 编写于 作者: X xiefangqi

fix py_transform gpu hang problem

上级 9fe6074c
......@@ -125,8 +125,11 @@ void GPUSession::RunGraph(const GraphId &graph_id, const std::vector<tensor::Ten
MS_EXCEPTION_IF_NULL(kernel_graph);
// Convert inputs to model
predictmodel::StepConvertWeight(inputs);
// Run graph on GPU
Execute(kernel_graph);
{
py::gil_scoped_release gil_release;
// Run graph on GPU
Execute(kernel_graph);
}
// Get result from GPU
UpdateOutputs(kernel_graph, outputs, inputs);
// Summary
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册