P4 to Git Change 2047424 by lmoriche@lmoriche_opencl_dev2 on 2019/12/17 20:13:01
SWDEV-216705 - [hipclang-vdi-rocm][FBA-80]Test crash when all GPUs are hidden by ROCR_VISIBLE_DEVICES
Return an error instead of dereferencing a null pointer. This should address the issue described
in the ticket, but more places need fixing in the runtime to avoid crashes for corner cases.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#92 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#58 edit
[ROCm/clr commit: 8d32b426dd]
Цей коміт міститься в:
1 джерело
711cdc2d14
коміт
4ab8c60043
4 files changed
+15
-4
No files matched your search
@@ -437,7 +437,6 @@ int ihipGetDevice() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
assert(0 && "Current device not found?!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -446,7 +445,9 @@ hipError_t hipGetDevice ( int* deviceId ) {
|
||||
|
||||
if (deviceId != nullptr) {
|
||||
int dev = ihipGetDevice();
|
||||
assert(dev != -1);
|
||||
if (dev == -1) {
|
||||
HIP_RETURN(hipErrorNoDevice);
|
||||
}
|
||||
*deviceId = dev;
|
||||
HIP_RETURN(hipSuccess);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Заблокувати користувача