@@ -947,18 +947,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
947
947
case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP:
948
948
return ReturnValue (true );
949
949
case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP: {
950
- // TODO: Level Zero API allows to check support for all sub-features:
951
- // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS,
952
- // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT,
953
- // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE,
954
- // ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET,
955
- // ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT,
956
- // ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS
957
- // but UR has only one property to check the mutable command lists feature
958
- // support. For now return true if kernel arguments can be updated.
959
- auto KernelArgUpdateSupport =
960
- Device->ZeDeviceMutableCmdListsProperties ->mutableCommandFlags &
961
- ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS;
950
+ // Update support requires being able to update kernel arguments and all
951
+ // aspects of the kernel NDRange.
952
+ const ze_mutable_command_exp_flags_t UpdateMask =
953
+ ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS |
954
+ ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT |
955
+ ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE |
956
+ ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET;
957
+
958
+ const bool KernelArgUpdateSupport =
959
+ (Device->ZeDeviceMutableCmdListsProperties ->mutableCommandFlags &
960
+ UpdateMask) == UpdateMask;
962
961
return ReturnValue (KernelArgUpdateSupport &&
963
962
Device->Platform ->ZeMutableCmdListExt .Supported );
964
963
}
0 commit comments