Skip to content

[SYCL] Return proper info for max alloc size in Level-Zero #3500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,14 +1460,8 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
// TODO: To confirm with spec.
return ReturnValue(pi_uint32{64});
}
case PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: {
// TODO: To confirm with spec.
uint32_t MaxMemAllocSize = 0;
for (uint32_t I = 0; I < ZeAvailMemCount; I++) {
MaxMemAllocSize += ZeDeviceMemoryProperties[I].totalSize;
}
return ReturnValue(pi_uint64{MaxMemAllocSize});
}
case PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE:
return ReturnValue(pi_uint64{Device->ZeDeviceProperties.maxMemAllocSize});
case PI_DEVICE_INFO_GLOBAL_MEM_SIZE: {
uint64_t GlobalMemSize = 0;
for (uint32_t I = 0; I < ZeAvailMemCount; I++) {
Expand Down