Skip to content

Commit 8dbaa53

Browse files
[SYCL] Return proper info for max alloc size in Level-Zero (#3500)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent d822eda commit 8dbaa53

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,14 +1607,8 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
16071607
// TODO: To confirm with spec.
16081608
return ReturnValue(pi_uint32{64});
16091609
}
1610-
case PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: {
1611-
// TODO: To confirm with spec.
1612-
uint32_t MaxMemAllocSize = 0;
1613-
for (uint32_t I = 0; I < ZeAvailMemCount; I++) {
1614-
MaxMemAllocSize += ZeDeviceMemoryProperties[I].totalSize;
1615-
}
1616-
return ReturnValue(pi_uint64{MaxMemAllocSize});
1617-
}
1610+
case PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE:
1611+
return ReturnValue(pi_uint64{Device->ZeDeviceProperties.maxMemAllocSize});
16181612
case PI_DEVICE_INFO_GLOBAL_MEM_SIZE: {
16191613
uint64_t GlobalMemSize = 0;
16201614
for (uint32_t I = 0; I < ZeAvailMemCount; I++) {

0 commit comments

Comments
 (0)