Browse Source

!6131 fix gpu pynative eval

Merge pull request !6131 from panfengfeng/fix_pynative_gpu_eval
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
234b7a6033
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc

+ 3
- 0
mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc View File

@@ -15,6 +15,7 @@
*/
#include "runtime/device/gpu/gpu_kernel_runtime.h"
#include <algorithm>
#include "pybind11/pybind11.h"
#include "runtime/device/gpu/gpu_device_address.h"
#include "runtime/device/gpu/cuda_driver.h"
#include "runtime/device/gpu/gpu_buffer_mgr.h"
@@ -41,6 +42,7 @@
namespace mindspore {
namespace device {
namespace gpu {
namespace py = pybind11;
using mindspore::device::memswap::MemSwapInfoSet;
using mindspore::device::memswap::MemSwapManager;
using mindspore::device::memswap::SwapKind;
@@ -322,6 +324,7 @@ bool GPUKernelRuntime::Run(session::KernelGraph *graph, bool is_task_sink, Debug

ret = RunOneStep(graph, debugger);
} else {
py::gil_scoped_release gil_release;
ret = LaunchKernel(graph);
}
(void)gettimeofday(&end_time, nullptr);


Loading…
Cancel
Save