@@ -85,6 +85,21 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
85
85
case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL:
86
86
// TODO: Implement subgroups in Offload
87
87
return ReturnValue (1 );
88
+ case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE:
89
+ if (pPropSizeRet) {
90
+ *pPropSizeRet = sizeof (size_t );
91
+ }
92
+
93
+ if (pPropValue) {
94
+ uint32_t as32;
95
+ OL_RETURN_ON_ERR (olGetDeviceInfo (hDevice->OffloadDevice ,
96
+ OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE,
97
+ sizeof (as32), &as32));
98
+
99
+ *reinterpret_cast <size_t *>(pPropValue) = as32;
100
+ }
101
+
102
+ return UR_RESULT_SUCCESS;
88
103
case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: {
89
104
// OL dimensions are uint32_t while UR is size_t, so they need to be mapped
90
105
if (pPropSizeRet) {
@@ -94,9 +109,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
94
109
if (pPropValue) {
95
110
ol_dimensions_t olVec;
96
111
size_t *urVec = reinterpret_cast <size_t *>(pPropValue);
97
- OL_RETURN_ON_ERR (olGetDeviceInfo (hDevice->OffloadDevice ,
98
- OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE,
99
- sizeof (olVec), &olVec));
112
+ OL_RETURN_ON_ERR (
113
+ olGetDeviceInfo (hDevice->OffloadDevice ,
114
+ OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE_PER_DIMENSION,
115
+ sizeof (olVec), &olVec));
100
116
101
117
urVec[0 ] = olVec.x ;
102
118
urVec[1 ] = olVec.y ;
0 commit comments