diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index f4d7f95e0b..b1eb1a7b1b 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -718,7 +718,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo( } } } - return ReturnValue(std::min(GlobalMemSize, FreeMemory)); + if (MemCount > 0) { + return ReturnValue(std::min(GlobalMemSize, FreeMemory)); + } else { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; + } } case UR_DEVICE_INFO_MEMORY_CLOCK_RATE: { // If there are not any memory modules then return 0.