Skip to content

Commit

Permalink
Merge pull request oneapi-src#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 authored and kbenzie committed Apr 8, 2024
1 parent 1ee81f4 commit 65af257
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 65af257

Please sign in to comment.