diff --git a/projects/hip/api/hip/hip_device.cpp b/projects/hip/api/hip/hip_device.cpp index dc63666876..010e46a33b 100644 --- a/projects/hip/api/hip/hip_device.cpp +++ b/projects/hip/api/hip/hip_device.cpp @@ -99,6 +99,10 @@ hipError_t ihipDeviceGetCount(int* count) { // Get all available devices *count = g_devices.size(); + if (*count < 1) { + return hipErrorNoDevice; + } + return hipSuccess; }