提交 48ab2081 编写于 作者: P panfengfeng

fix dataset train gil of gpu

上级 800b9dc5
...@@ -296,7 +296,10 @@ py::tuple GPUSession::RunOp(const OpRunInfo &op_run_info, const GraphInfo &graph ...@@ -296,7 +296,10 @@ py::tuple GPUSession::RunOp(const OpRunInfo &op_run_info, const GraphInfo &graph
RunOpAllocateMemory(op_run_info.value, input_tensors, kernel_graph.get()); RunOpAllocateMemory(op_run_info.value, input_tensors, kernel_graph.get());
// Execute the computation // Execute the computation
LoadInputData(kernel_graph, input_tensors); LoadInputData(kernel_graph, input_tensors);
Execute(kernel_graph); {
py::gil_scoped_release gil_release;
Execute(kernel_graph);
}
// Fetch outputs // Fetch outputs
VectorRef outputs; VectorRef outputs;
UpdateOutputs(kernel_graph, &outputs, input_tensors); UpdateOutputs(kernel_graph, &outputs, input_tensors);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册