diff --git a/mindspore/ccsrc/backend/session/gpu_session.cc b/mindspore/ccsrc/backend/session/gpu_session.cc index b3b6844e884202af8f06871cfcebcd6bb96de5cc..2a5929f3833035dff28420295fe0248435814bad 100644 --- a/mindspore/ccsrc/backend/session/gpu_session.cc +++ b/mindspore/ccsrc/backend/session/gpu_session.cc @@ -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()); // 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);