Skip to content

Commit 8b18b37

Browse files
author
Hugh Delaney
committed
Add device queries for all adapters
1 parent bfcfdb2 commit 8b18b37

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

source/adapters/hip/device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
881881
return ReturnValue(false);
882882
case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP:
883883
return ReturnValue(true);
884+
case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: {
885+
// HIP supports enqueueing native work through the urNativeEnqueueExp
886+
return ReturnValue(true);
887+
}
884888

885889
// TODO: Investigate if this information is available on HIP.
886890
case UR_DEVICE_INFO_COMPONENT_DEVICES:

source/adapters/level_zero/device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
874874
case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP: {
875875
return ReturnValue(static_cast<ur_bool_t>(true));
876876
}
877+
case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: {
878+
// L0 doesn't support enqueueing native work through the urNativeEnqueueExp
879+
return ReturnValue(static_cast<ur_bool_t>(false));
880+
}
877881

878882
case UR_DEVICE_INFO_ESIMD_SUPPORT: {
879883
// ESIMD is only supported by Intel GPUs.

source/adapters/native_cpu/device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
321321

322322
case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP:
323323
return ReturnValue(false);
324+
325+
case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP:
326+
return ReturnValue(false);
327+
324328
default:
325329
DIE_NO_IMPLEMENTATION;
326330
}

source/adapters/opencl/device.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
802802
case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP: {
803803
return ReturnValue(false);
804804
}
805+
case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: {
806+
return ReturnValue(false);
807+
}
805808
case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: {
806809
bool Supported = false;
807810
CL_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions(

0 commit comments

Comments
 (0)