Skip to content

Commit ceba4a5

Browse files
authored
Merge pull request #1320 from aarongreig/aaron/hotfix1192
Fix CI regression by generating missing bits in nullddi and ldrddi
2 parents b76d907 + 81b7599 commit ceba4a5

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

source/adapters/null/ur_nullddi.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

source/loader/ur_ldrddi.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)