diff --git a/source/adapters/null/ur_nullddi.cpp b/source/adapters/null/ur_nullddi.cpp index 464aa59d54..439246658a 100644 --- a/source/adapters/null/ur_nullddi.cpp +++ b/source/adapters/null/ur_nullddi.cpp @@ -395,6 +395,24 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo( reinterpret_cast(d_context.get()); } } break; + case UR_DEVICE_INFO_COMPONENT_DEVICES: { + ur_device_handle_t *handles = + reinterpret_cast(pPropValue); + size_t nelements = propSize / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelements; ++i) { + handles[i] = + reinterpret_cast(d_context.get()); + } + } break; + case UR_DEVICE_INFO_COMPOSITE_DEVICE: { + ur_device_handle_t *handles = + reinterpret_cast(pPropValue); + size_t nelements = propSize / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelements; ++i) { + handles[i] = + reinterpret_cast(d_context.get()); + } + } break; default: { } break; } diff --git a/source/loader/ur_ldrddi.cpp b/source/loader/ur_ldrddi.cpp index a3a4ccaaa0..43326ff5d0 100644 --- a/source/loader/ur_ldrddi.cpp +++ b/source/loader/ur_ldrddi.cpp @@ -546,6 +546,30 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo( } } } break; + case UR_DEVICE_INFO_COMPONENT_DEVICES: { + ur_device_handle_t *handles = + reinterpret_cast(pPropValue); + size_t nelements = *pPropSizeRet / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelements; ++i) { + if (handles[i] != nullptr) { + handles[i] = reinterpret_cast( + ur_device_factory.getInstance(handles[i], + dditable)); + } + } + } break; + case UR_DEVICE_INFO_COMPOSITE_DEVICE: { + ur_device_handle_t *handles = + reinterpret_cast(pPropValue); + size_t nelements = *pPropSizeRet / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelements; ++i) { + if (handles[i] != nullptr) { + handles[i] = reinterpret_cast( + ur_device_factory.getInstance(handles[i], + dditable)); + } + } + } break; default: { } break; }