P4 to Git Change 1979482 by zukhan@zukhan-ocl-win10 on 2019/08/07 11:30:33
SWDEV-196326 - [hipclang-vdi-rocm]: [FBA-80]: Runtime error when all GPUs are hidden by ROCR_VISIBLE_DEVICES
- Adjusted hipGetDeviceCount to return "hipErrorNoDevice".
- This was done to match the same behaviour as HIP-HCC, and API spec for when no devices are found. Rather then return "count = 0" as it did.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/17789/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device.cpp#22 edit
[ROCm/hip commit: 7f0373f2e3]
This commit is contained in:
@@ -99,6 +99,10 @@ hipError_t ihipDeviceGetCount(int* count) {
|
||||
// Get all available devices
|
||||
*count = g_devices.size();
|
||||
|
||||
if (*count < 1) {
|
||||
return hipErrorNoDevice;
|
||||
}
|
||||
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user