Skip to content

Commit

Permalink
Merge pull request #1486 from nrspruit/fix_memfree_report
Browse files Browse the repository at this point in the history
[L0] Fix DeviceInfo global mem free to report unsupported given MemCount==0
  • Loading branch information
aarongreig committed Apr 5, 2024
2 parents b915354 + ec773e6 commit 065bf2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 065bf2d

Please sign in to comment.