@@ -85,6 +85,21 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
8585 case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL:
8686 // TODO: Implement subgroups in Offload
8787 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;
88103 case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: {
89104 // OL dimensions are uint32_t while UR is size_t, so they need to be mapped
90105 if (pPropSizeRet) {
@@ -94,9 +109,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
94109 if (pPropValue) {
95110 ol_dimensions_t olVec;
96111 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));
100116
101117 urVec[0 ] = olVec.x ;
102118 urVec[1 ] = olVec.y ;
0 commit comments