forked from huawei/mindspore2022
fix dataset train gil of gpu
This commit is contained in:
parent
4f1e586ee3
commit
4eea891730
|
|
@ -281,7 +281,10 @@ py::tuple GPUSession::RunOp(const OpRunInfo &op_run_info, const GraphInfo &graph
|
|||
RunOpAllocateMemory(input_tensors, kernel_graph.get());
|
||||
// Execute the computation
|
||||
LoadInputData(kernel_graph, input_tensors);
|
||||
Execute(kernel_graph);
|
||||
{
|
||||
py::gil_scoped_release gil_release;
|
||||
Execute(kernel_graph);
|
||||
}
|
||||
// Fetch outputs
|
||||
VectorRef outputs;
|
||||
UpdateOutputs(kernel_graph, &outputs, input_tensors);
|
||||
|
|
|
|||
Loading…
Reference in New Issue