Browse Source

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

From: @zyli2020
Reviewed-by: @cristoval,@limingqi107
Signed-off-by: @limingqi107
pull/14328/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
e5566feb46
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