Browse Source

!3635 fix dataset & train gil lock of gpu process master

Merge pull request !3635 from panfengfeng/fix_dataset_train_gil_of_gpu_master
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
c57ad1528f
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      mindspore/ccsrc/backend/session/gpu_session.cc

+ 4
- 1
mindspore/ccsrc/backend/session/gpu_session.cc View File

@@ -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);


Loading…
Cancel
Save