Browse Source

fix py_transform gpu hang problem

tags/v0.3.0-alpha
xiefangqi 5 years ago
parent
commit
8b585c76e2
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      mindspore/ccsrc/session/gpu_session.cc

+ 5
- 2
mindspore/ccsrc/session/gpu_session.cc View File

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


Loading…
Cancel
Save