File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,24 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo(
395395 reinterpret_cast <ur_device_handle_t >(d_context.get ());
396396 }
397397 } break ;
398+ case UR_DEVICE_INFO_COMPONENT_DEVICES: {
399+ ur_device_handle_t *handles =
400+ reinterpret_cast <ur_device_handle_t *>(pPropValue);
401+ size_t nelements = propSize / sizeof (ur_device_handle_t );
402+ for (size_t i = 0 ; i < nelements; ++i) {
403+ handles[i] =
404+ reinterpret_cast <ur_device_handle_t >(d_context.get ());
405+ }
406+ } break ;
407+ case UR_DEVICE_INFO_COMPOSITE_DEVICE: {
408+ ur_device_handle_t *handles =
409+ reinterpret_cast <ur_device_handle_t *>(pPropValue);
410+ size_t nelements = propSize / sizeof (ur_device_handle_t );
411+ for (size_t i = 0 ; i < nelements; ++i) {
412+ handles[i] =
413+ reinterpret_cast <ur_device_handle_t >(d_context.get ());
414+ }
415+ } break ;
398416 default : {
399417 } break ;
400418 }
Original file line number Diff line number Diff line change @@ -546,6 +546,30 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo(
546546 }
547547 }
548548 } break ;
549+ case UR_DEVICE_INFO_COMPONENT_DEVICES: {
550+ ur_device_handle_t *handles =
551+ reinterpret_cast <ur_device_handle_t *>(pPropValue);
552+ size_t nelements = *pPropSizeRet / sizeof (ur_device_handle_t );
553+ for (size_t i = 0 ; i < nelements; ++i) {
554+ if (handles[i] != nullptr ) {
555+ handles[i] = reinterpret_cast <ur_device_handle_t >(
556+ ur_device_factory.getInstance (handles[i],
557+ dditable));
558+ }
559+ }
560+ } break ;
561+ case UR_DEVICE_INFO_COMPOSITE_DEVICE: {
562+ ur_device_handle_t *handles =
563+ reinterpret_cast <ur_device_handle_t *>(pPropValue);
564+ size_t nelements = *pPropSizeRet / sizeof (ur_device_handle_t );
565+ for (size_t i = 0 ; i < nelements; ++i) {
566+ if (handles[i] != nullptr ) {
567+ handles[i] = reinterpret_cast <ur_device_handle_t >(
568+ ur_device_factory.getInstance (handles[i],
569+ dditable));
570+ }
571+ }
572+ } break ;
549573 default : {
550574 } break ;
551575 }
You can’t perform that action at this time.
0 commit comments