Browse Source

[bugfix]Not set device id in asynchronous compile and run graph

pull/14328/head
lizhenyu 5 years ago
parent
commit
cf2244f1ef
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc

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

@@ -71,6 +71,7 @@ bool GPUKernelRuntime::Init() {
enable_relation_cache_ = context::GraphKernelFlags::GetInstance().IsEnableGraphKernel();

if (device_init_ == true) {
CHECK_OP_RET_WITH_EXCEPT(CudaDriver::SetDevice(UintToInt(device_id_)), "Failed to set device id");
GPUMemoryAllocator::GetInstance().CheckMaxDeviceMemory();
return true;
}


Loading…
Cancel
Save