diff --git a/projects/clr/hipamd/api/hip/hip_device.cpp b/projects/clr/hipamd/api/hip/hip_device.cpp index 30ad2f3af1..4da7e42f4c 100644 --- a/projects/clr/hipamd/api/hip/hip_device.cpp +++ b/projects/clr/hipamd/api/hip/hip_device.cpp @@ -96,8 +96,10 @@ hipError_t ihipDeviceGetCount(int* count) { return hipErrorInvalidValue; } + auto* deviceHandle = g_devices[0]->devices()[0]; + // Get all available devices - *count = g_devices.size(); + *count = deviceHandle->isOrdinalValid() ? g_devices.size() : 0; return hipSuccess; }