Skip to content

Commit 995df84

Browse files
authored
Merge pull request #2162 from coldav/colin/device_info_max_sub_groups
[NATIVECPU] Add UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE for device info
2 parents 3bf0108 + 89fa5ad commit 995df84

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/adapters/native_cpu/device.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
180180
case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE:
181181
// TODO: provide a mechanism to estimate/configure this.
182182
return ReturnValue(size_t{2048});
183+
case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS:
184+
// Set the max sub groups to be the same as the max work group size.
185+
return ReturnValue(uint32_t{2048});
183186
case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN:
184187
// Imported from level_zero
185188
return ReturnValue(uint32_t{8});
@@ -357,7 +360,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
357360
case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU:
358361
case UR_DEVICE_INFO_UUID:
359362
case UR_DEVICE_INFO_DEVICE_ID:
360-
case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS:
361363
case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS:
362364
case UR_DEVICE_INFO_IL_VERSION:
363365
case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D:

test/conformance/device/device_adapter_native_cpu.match

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GLOBAL_MEM_FREE
1111
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
1212
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
1313
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_IL_VERSION
14-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS
1514
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
1615
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_UUID
1716
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_PCI_ADDRESS

0 commit comments

Comments
 (0)