Skip to content

Commit 11b90fc

Browse files
authored
[UR][Offload] Add some more device info queries (#20099)
1 parent da0da2b commit 11b90fc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

unified-runtime/source/adapters/offload/device.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
7171
case UR_DEVICE_INFO_PLATFORM:
7272
return ReturnValue(hDevice->Platform);
7373
break;
74+
case UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION:
75+
return ReturnValue((std::to_string(OL_VERSION_MAJOR) + "." +
76+
std::to_string(OL_VERSION_MINOR) + "." +
77+
std::to_string(OL_VERSION_PATCH))
78+
.c_str());
79+
case UR_DEVICE_INFO_PROFILE:
80+
// This doesn't make sense for non-opencl devices, copy other backends and
81+
// just return FULL_PROFILE
82+
return ReturnValue("FULL_PROFILE");
7483
case UR_DEVICE_INFO_MAX_COMPUTE_UNITS:
7584
case UR_DEVICE_INFO_NUM_COMPUTE_UNITS:
7685
olInfo = OL_DEVICE_INFO_NUM_COMPUTE_UNITS;
@@ -189,6 +198,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
189198
case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT:
190199
case UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT:
191200
case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT:
201+
case UR_DEVICE_INFO_ASYNC_BARRIER:
202+
case UR_DEVICE_INFO_ESIMD_SUPPORT:
192203
// TODO: Atomic queries in Offload
193204
case UR_DEVICE_INFO_ATOMIC_64:
194205
case UR_DEVICE_INFO_IMAGE_SRGB:

0 commit comments

Comments
 (0)