diff --git a/unified-runtime/source/adapters/offload/device.cpp b/unified-runtime/source/adapters/offload/device.cpp index ebe0405b8917e..747eb97f39f7f 100644 --- a/unified-runtime/source/adapters/offload/device.cpp +++ b/unified-runtime/source/adapters/offload/device.cpp @@ -76,6 +76,26 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(uint32_t{1}); case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: return ReturnValue(uint32_t{3}); + case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { + // OL dimensions are uint32_t while UR is size_t, so they need to be mapped + if (pPropSizeRet) { + *pPropSizeRet = sizeof(size_t) * 3; + } + + if (pPropValue) { + ol_dimensions_t olVec; + size_t *urVec = reinterpret_cast(pPropValue); + OL_RETURN_ON_ERR(olGetDeviceInfo(hDevice->OffloadDevice, + OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE, + sizeof(olVec), &olVec)); + + urVec[0] = olVec.x; + urVec[1] = olVec.y; + urVec[2] = olVec.z; + } + + return UR_RESULT_SUCCESS; + } // Unimplemented features case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS: case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT: