Skip to content

Commit

Permalink
Merge pull request #1320 from aarongreig/aaron/hotfix1192
Browse files Browse the repository at this point in the history
Fix CI regression by generating missing bits in nullddi and ldrddi
  • Loading branch information
aarongreig committed Feb 7, 2024
2 parents b76d907 + 81b7599 commit ceba4a5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/adapters/null/ur_nullddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,24 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo(
reinterpret_cast<ur_device_handle_t>(d_context.get());
}
} break;
case UR_DEVICE_INFO_COMPONENT_DEVICES: {
ur_device_handle_t *handles =
reinterpret_cast<ur_device_handle_t *>(pPropValue);
size_t nelements = propSize / sizeof(ur_device_handle_t);
for (size_t i = 0; i < nelements; ++i) {
handles[i] =
reinterpret_cast<ur_device_handle_t>(d_context.get());
}
} break;
case UR_DEVICE_INFO_COMPOSITE_DEVICE: {
ur_device_handle_t *handles =
reinterpret_cast<ur_device_handle_t *>(pPropValue);
size_t nelements = propSize / sizeof(ur_device_handle_t);
for (size_t i = 0; i < nelements; ++i) {
handles[i] =
reinterpret_cast<ur_device_handle_t>(d_context.get());
}
} break;
default: {
} break;
}
Expand Down
24 changes: 24 additions & 0 deletions source/loader/ur_ldrddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ur_device_handle_t *>(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_handle_t>(
ur_device_factory.getInstance(handles[i],
dditable));
}
}
} break;
case UR_DEVICE_INFO_COMPOSITE_DEVICE: {
ur_device_handle_t *handles =
reinterpret_cast<ur_device_handle_t *>(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_handle_t>(
ur_device_factory.getInstance(handles[i],
dditable));
}
}
} break;
default: {
} break;
}
Expand Down

0 comments on commit ceba4a5

Please sign in to comment.