diff --git a/include/ur.py b/include/ur.py index 810d8c2cba..97ade284d0 100644 --- a/include/ur.py +++ b/include/ur.py @@ -238,6 +238,11 @@ class ur_structure_type_v(IntEnum): DEVICE_PARTITION_PROPERTIES = 26 ## ::ur_device_partition_properties_t KERNEL_ARG_MEM_OBJ_PROPERTIES = 27 ## ::ur_kernel_arg_mem_obj_properties_t PHYSICAL_MEM_PROPERTIES = 28 ## ::ur_physical_mem_properties_t + KERNEL_ARG_POINTER_PROPERTIES = 29 ## ::ur_kernel_arg_pointer_properties_t + KERNEL_ARG_SAMPLER_PROPERTIES = 30 ## ::ur_kernel_arg_sampler_properties_t + KERNEL_EXEC_INFO_PROPERTIES = 31 ## ::ur_kernel_exec_info_properties_t + KERNEL_ARG_VALUE_PROPERTIES = 32 ## ::ur_kernel_arg_value_properties_t + KERNEL_ARG_LOCAL_PROPERTIES = 33 ## ::ur_kernel_arg_local_properties_t EXP_COMMAND_BUFFER_DESC = 0x1000 ## ::ur_exp_command_buffer_desc_t EXP_SAMPLER_MIP_PROPERTIES = 0x2000 ## ::ur_exp_sampler_mip_properties_t @@ -1499,6 +1504,24 @@ class ur_program_native_properties_t(Structure): ## transfer the ownership to the unified-runtime. ] +############################################################################### +## @brief Properties for for ::urKernelSetArgValue. +class ur_kernel_arg_value_properties_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES + ("pNext", c_void_p) ## [in,out][optional] pointer to extension-specific structure + ] + +############################################################################### +## @brief Properties for for ::urKernelSetArgLocal. +class ur_kernel_arg_local_properties_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES + ("pNext", c_void_p) ## [in,out][optional] pointer to extension-specific structure + ] + ############################################################################### ## @brief Get Kernel object information class ur_kernel_info_v(IntEnum): @@ -1574,6 +1597,33 @@ def __str__(self): return str(ur_kernel_exec_info_v(self.value)) +############################################################################### +## @brief Properties for for ::urKernelSetArgPointer. +class ur_kernel_arg_pointer_properties_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES + ("pNext", c_void_p) ## [in,out][optional] pointer to extension-specific structure + ] + +############################################################################### +## @brief Properties for for ::urKernelSetExecInfo. +class ur_kernel_exec_info_properties_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES + ("pNext", c_void_p) ## [in,out][optional] pointer to extension-specific structure + ] + +############################################################################### +## @brief Properties for for ::urKernelSetArgSampler. +class ur_kernel_arg_sampler_properties_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES + ("pNext", c_void_p) ## [in,out][optional] pointer to extension-specific structure + ] + ############################################################################### ## @brief Properties for for ::urKernelSetArgMemObj. class ur_kernel_arg_mem_obj_properties_t(Structure): @@ -2452,37 +2502,37 @@ class ur_program_dditable_t(Structure): ############################################################################### ## @brief Function-pointer for urKernelSetArgValue if __use_win_types: - _urKernelSetArgValue_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, c_void_p ) + _urKernelSetArgValue_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, POINTER(ur_kernel_arg_value_properties_t), c_void_p ) else: - _urKernelSetArgValue_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, c_void_p ) + _urKernelSetArgValue_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, POINTER(ur_kernel_arg_value_properties_t), c_void_p ) ############################################################################### ## @brief Function-pointer for urKernelSetArgLocal if __use_win_types: - _urKernelSetArgLocal_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t ) + _urKernelSetArgLocal_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, POINTER(ur_kernel_arg_local_properties_t) ) else: - _urKernelSetArgLocal_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t ) + _urKernelSetArgLocal_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_size_t, POINTER(ur_kernel_arg_local_properties_t) ) ############################################################################### ## @brief Function-pointer for urKernelSetArgPointer if __use_win_types: - _urKernelSetArgPointer_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_void_p ) + _urKernelSetArgPointer_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_pointer_properties_t), c_void_p ) else: - _urKernelSetArgPointer_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, c_void_p ) + _urKernelSetArgPointer_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_pointer_properties_t), c_void_p ) ############################################################################### ## @brief Function-pointer for urKernelSetExecInfo if __use_win_types: - _urKernelSetExecInfo_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, ur_kernel_exec_info_t, c_size_t, c_void_p ) + _urKernelSetExecInfo_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, ur_kernel_exec_info_t, c_size_t, POINTER(ur_kernel_exec_info_properties_t), c_void_p ) else: - _urKernelSetExecInfo_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, ur_kernel_exec_info_t, c_size_t, c_void_p ) + _urKernelSetExecInfo_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, ur_kernel_exec_info_t, c_size_t, POINTER(ur_kernel_exec_info_properties_t), c_void_p ) ############################################################################### ## @brief Function-pointer for urKernelSetArgSampler if __use_win_types: - _urKernelSetArgSampler_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, ur_sampler_handle_t ) + _urKernelSetArgSampler_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_sampler_properties_t), ur_sampler_handle_t ) else: - _urKernelSetArgSampler_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, ur_sampler_handle_t ) + _urKernelSetArgSampler_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_sampler_properties_t), ur_sampler_handle_t ) ############################################################################### ## @brief Function-pointer for urKernelSetArgMemObj diff --git a/include/ur_api.h b/include/ur_api.h index a7a12b108f..eb15d9b626 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -261,6 +261,11 @@ typedef enum ur_structure_type_t { UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES = 26, ///< ::ur_device_partition_properties_t UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES = 27, ///< ::ur_kernel_arg_mem_obj_properties_t UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 28, ///< ::ur_physical_mem_properties_t + UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES = 29, ///< ::ur_kernel_arg_pointer_properties_t + UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES = 30, ///< ::ur_kernel_arg_sampler_properties_t + UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES = 31, ///< ::ur_kernel_exec_info_properties_t + UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES = 32, ///< ::ur_kernel_arg_value_properties_t + UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES = 33, ///< ::ur_kernel_arg_local_properties_t UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 0x1000, ///< ::ur_exp_command_buffer_desc_t UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t /// @cond @@ -3829,6 +3834,15 @@ urKernelCreate( ur_kernel_handle_t *phKernel ///< [out] pointer to handle of kernel object created. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Properties for for ::urKernelSetArgValue. +typedef struct ur_kernel_arg_value_properties_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + +} ur_kernel_arg_value_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Set kernel argument to a value. /// @@ -3849,12 +3863,22 @@ urKernelCreate( /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgValue( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - size_t argSize, ///< [in] size of argument type - const void *pArgValue ///< [in] argument value represented as matching arg type. + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t *pProperties, ///< [in][optional] pointer to value properties. + const void *pArgValue ///< [in] argument value represented as matching arg type. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Properties for for ::urKernelSetArgLocal. +typedef struct ur_kernel_arg_local_properties_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + +} ur_kernel_arg_local_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Set kernel argument to a local buffer. /// @@ -3873,9 +3897,10 @@ urKernelSetArgValue( /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgLocal( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - size_t argSize ///< [in] size of the local buffer to be allocated by the runtime + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + size_t argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t *pProperties ///< [in][optional] pointer to local buffer properties. ); /////////////////////////////////////////////////////////////////////////////// @@ -4094,6 +4119,15 @@ urKernelRelease( ur_kernel_handle_t hKernel ///< [in] handle for the Kernel to release ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Properties for for ::urKernelSetArgPointer. +typedef struct ur_kernel_arg_pointer_properties_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + +} ur_kernel_arg_pointer_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Set a USM pointer as the argument value of a Kernel. /// @@ -4116,12 +4150,22 @@ urKernelRelease( /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgPointer( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - const void *pArgValue ///< [in][optional] USM pointer to memory location holding the argument - ///< value. If null then argument value is considered null. + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t *pProperties, ///< [in][optional] pointer to USM pointer properties. + const void *pArgValue ///< [in][optional] USM pointer to memory location holding the argument + ///< value. If null then argument value is considered null. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Properties for for ::urKernelSetExecInfo. +typedef struct ur_kernel_exec_info_properties_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + +} ur_kernel_exec_info_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Set additional Kernel execution attributes. /// @@ -4146,13 +4190,23 @@ urKernelSetArgPointer( /// + `NULL == pPropValue` UR_APIEXPORT ur_result_t UR_APICALL urKernelSetExecInfo( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute - size_t propSize, ///< [in] size in byte the attribute value - const void *pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding - ///< the property value. + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute + size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t *pProperties, ///< [in][optional] pointer to execution info properties. + const void *pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding + ///< the property value. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Properties for for ::urKernelSetArgSampler. +typedef struct ur_kernel_arg_sampler_properties_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + +} ur_kernel_arg_sampler_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Set a Sampler object as the argument value of a Kernel. /// @@ -4171,9 +4225,10 @@ urKernelSetExecInfo( /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgSampler( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t *pProperties, ///< [in][optional] pointer to sampler properties. + ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ); /////////////////////////////////////////////////////////////////////////////// @@ -7743,6 +7798,7 @@ typedef struct ur_kernel_set_arg_value_params_t { ur_kernel_handle_t *phKernel; uint32_t *pargIndex; size_t *pargSize; + const ur_kernel_arg_value_properties_t **ppProperties; const void **ppArgValue; } ur_kernel_set_arg_value_params_t; @@ -7754,6 +7810,7 @@ typedef struct ur_kernel_set_arg_local_params_t { ur_kernel_handle_t *phKernel; uint32_t *pargIndex; size_t *pargSize; + const ur_kernel_arg_local_properties_t **ppProperties; } ur_kernel_set_arg_local_params_t; /////////////////////////////////////////////////////////////////////////////// @@ -7763,6 +7820,7 @@ typedef struct ur_kernel_set_arg_local_params_t { typedef struct ur_kernel_set_arg_pointer_params_t { ur_kernel_handle_t *phKernel; uint32_t *pargIndex; + const ur_kernel_arg_pointer_properties_t **ppProperties; const void **ppArgValue; } ur_kernel_set_arg_pointer_params_t; @@ -7774,6 +7832,7 @@ typedef struct ur_kernel_set_exec_info_params_t { ur_kernel_handle_t *phKernel; ur_kernel_exec_info_t *ppropName; size_t *ppropSize; + const ur_kernel_exec_info_properties_t **ppProperties; const void **ppPropValue; } ur_kernel_set_exec_info_params_t; @@ -7784,6 +7843,7 @@ typedef struct ur_kernel_set_exec_info_params_t { typedef struct ur_kernel_set_arg_sampler_params_t { ur_kernel_handle_t *phKernel; uint32_t *pargIndex; + const ur_kernel_arg_sampler_properties_t **ppProperties; ur_sampler_handle_t *phArgValue; } ur_kernel_set_arg_sampler_params_t; diff --git a/include/ur_ddi.h b/include/ur_ddi.h index 25e775fef1..4dc37862f8 100644 --- a/include/ur_ddi.h +++ b/include/ur_ddi.h @@ -481,6 +481,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgValue_t)( ur_kernel_handle_t, uint32_t, size_t, + const ur_kernel_arg_value_properties_t *, const void *); /////////////////////////////////////////////////////////////////////////////// @@ -488,13 +489,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgValue_t)( typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgLocal_t)( ur_kernel_handle_t, uint32_t, - size_t); + size_t, + const ur_kernel_arg_local_properties_t *); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urKernelSetArgPointer typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgPointer_t)( ur_kernel_handle_t, uint32_t, + const ur_kernel_arg_pointer_properties_t *, const void *); /////////////////////////////////////////////////////////////////////////////// @@ -503,6 +506,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnKernelSetExecInfo_t)( ur_kernel_handle_t, ur_kernel_exec_info_t, size_t, + const ur_kernel_exec_info_properties_t *, const void *); /////////////////////////////////////////////////////////////////////////////// @@ -510,6 +514,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnKernelSetExecInfo_t)( typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgSampler_t)( ur_kernel_handle_t, uint32_t, + const ur_kernel_arg_sampler_properties_t *, ur_sampler_handle_t); /////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/core/common.yml b/scripts/core/common.yml index cbf8cb7a68..02bffd0751 100644 --- a/scripts/core/common.yml +++ b/scripts/core/common.yml @@ -327,6 +327,16 @@ etors: desc: $x_kernel_arg_mem_obj_properties_t - name: PHYSICAL_MEM_PROPERTIES desc: $x_physical_mem_properties_t + - name: KERNEL_ARG_POINTER_PROPERTIES + desc: $x_kernel_arg_pointer_properties_t + - name: KERNEL_ARG_SAMPLER_PROPERTIES + desc: $x_kernel_arg_sampler_properties_t + - name: KERNEL_EXEC_INFO_PROPERTIES + desc: $x_kernel_exec_info_properties_t + - name: KERNEL_ARG_VALUE_PROPERTIES + desc: $x_kernel_arg_value_properties_t + - name: KERNEL_ARG_LOCAL_PROPERTIES + desc: $x_kernel_arg_local_properties_t --- #-------------------------------------------------------------------------- type: struct desc: "Base for all properties types" diff --git a/scripts/core/kernel.yml b/scripts/core/kernel.yml index 103bb20e8e..cc659a2c1d 100644 --- a/scripts/core/kernel.yml +++ b/scripts/core/kernel.yml @@ -36,6 +36,13 @@ returns: - $X_RESULT_ERROR_INVALID_KERNEL_NAME: - "If `pKernelName` wasn't found in `hProgram`." --- #-------------------------------------------------------------------------- +type: struct +desc: "Properties for for $xKernelSetArgValue." +class: $xKernel +name: $x_kernel_arg_value_properties_t +base: $x_base_properties_t +members: [] +--- #-------------------------------------------------------------------------- type: function desc: "Set kernel argument to a value." class: $xKernel @@ -53,6 +60,9 @@ params: - type: "size_t" name: argSize desc: "[in] size of argument type" + - type: "const $x_kernel_arg_value_properties_t*" + name: pProperties + desc: "[in][optional] pointer to value properties." - type: "const void*" name: pArgValue desc: "[in] argument value represented as matching arg type." @@ -60,6 +70,13 @@ returns: - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE --- #-------------------------------------------------------------------------- +type: struct +desc: "Properties for for $xKernelSetArgLocal." +class: $xKernel +name: $x_kernel_arg_local_properties_t +base: $x_base_properties_t +members: [] +--- #-------------------------------------------------------------------------- type: function desc: "Set kernel argument to a local buffer." class: $xKernel @@ -77,6 +94,9 @@ params: - type: "size_t" name: argSize desc: "[in] size of the local buffer to be allocated by the runtime" + - type: "const $x_kernel_arg_local_properties_t*" + name: pProperties + desc: "[in][optional] pointer to local buffer properties." returns: - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE @@ -292,6 +312,13 @@ params: name: hKernel desc: "[in] handle for the Kernel to release" --- #-------------------------------------------------------------------------- +type: struct +desc: "Properties for for $xKernelSetArgPointer." +class: $xKernel +name: $x_kernel_arg_pointer_properties_t +base: $x_base_properties_t +members: [] +--- #-------------------------------------------------------------------------- type: function desc: "Set a USM pointer as the argument value of a Kernel." class: $xKernel @@ -308,6 +335,9 @@ params: - type: "uint32_t" name: argIndex desc: "[in] argument index in range [0, num args - 1]" + - type: "const $x_kernel_arg_pointer_properties_t*" + name: pProperties + desc: "[in][optional] pointer to USM pointer properties." - type: "const void*" name: pArgValue desc: "[in][optional] USM pointer to memory location holding the argument value. If null then argument value is considered null." @@ -315,6 +345,13 @@ returns: - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE --- #-------------------------------------------------------------------------- +type: struct +desc: "Properties for for $xKernelSetExecInfo." +class: $xKernel +name: $x_kernel_exec_info_properties_t +base: $x_base_properties_t +members: [] +--- #-------------------------------------------------------------------------- type: function desc: "Set additional Kernel execution attributes." class: $xKernel @@ -334,10 +371,20 @@ params: - type: "size_t" name: propSize desc: "[in] size in byte the attribute value" + - type: "const $x_kernel_exec_info_properties_t*" + name: pProperties + desc: "[in][optional] pointer to execution info properties." - type: "const void*" name: pPropValue desc: "[in][typename(propName, propSize)] pointer to memory location holding the property value." --- #-------------------------------------------------------------------------- +type: struct +desc: "Properties for for $xKernelSetArgSampler." +class: $xKernel +name: $x_kernel_arg_sampler_properties_t +base: $x_base_properties_t +members: [] +--- #-------------------------------------------------------------------------- type: function desc: "Set a Sampler object as the argument value of a Kernel." class: $xKernel @@ -352,6 +399,9 @@ params: - type: "uint32_t" name: argIndex desc: "[in] argument index in range [0, num args - 1]" + - type: "const $x_kernel_arg_sampler_properties_t*" + name: pProperties + desc: "[in][optional] pointer to sampler properties." - type: "$x_sampler_handle_t" name: hArgValue desc: "[in] handle of Sampler object." diff --git a/source/adapters/null/ur_nullddi.cpp b/source/adapters/null/ur_nullddi.cpp index e7ba9338a5..9f2fa9f394 100644 --- a/source/adapters/null/ur_nullddi.cpp +++ b/source/adapters/null/ur_nullddi.cpp @@ -1974,6 +1974,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) try { @@ -1982,7 +1984,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( // if the driver has created a custom function, then call it instead of using the generic path auto pfnSetArgValue = d_context.urDdiTable.Kernel.pfnSetArgValue; if (nullptr != pfnSetArgValue) { - result = pfnSetArgValue(hKernel, argIndex, argSize, pArgValue); + result = + pfnSetArgValue(hKernel, argIndex, argSize, pProperties, pArgValue); } else { // generic implementation } @@ -1998,14 +2001,16 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) try { ur_result_t result = UR_RESULT_SUCCESS; // if the driver has created a custom function, then call it instead of using the generic path auto pfnSetArgLocal = d_context.urDdiTable.Kernel.pfnSetArgLocal; if (nullptr != pfnSetArgLocal) { - result = pfnSetArgLocal(hKernel, argIndex, argSize); + result = pfnSetArgLocal(hKernel, argIndex, argSize, pProperties); } else { // generic implementation } @@ -2155,6 +2160,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelRelease( __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -2164,7 +2171,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( // if the driver has created a custom function, then call it instead of using the generic path auto pfnSetArgPointer = d_context.urDdiTable.Kernel.pfnSetArgPointer; if (nullptr != pfnSetArgPointer) { - result = pfnSetArgPointer(hKernel, argIndex, pArgValue); + result = pfnSetArgPointer(hKernel, argIndex, pProperties, pArgValue); } else { // generic implementation } @@ -2180,6 +2187,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -2189,7 +2198,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( // if the driver has created a custom function, then call it instead of using the generic path auto pfnSetExecInfo = d_context.urDdiTable.Kernel.pfnSetExecInfo; if (nullptr != pfnSetExecInfo) { - result = pfnSetExecInfo(hKernel, propName, propSize, pPropValue); + result = pfnSetExecInfo(hKernel, propName, propSize, pProperties, + pPropValue); } else { // generic implementation } @@ -2204,6 +2214,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) try { ur_result_t result = UR_RESULT_SUCCESS; @@ -2211,7 +2223,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( // if the driver has created a custom function, then call it instead of using the generic path auto pfnSetArgSampler = d_context.urDdiTable.Kernel.pfnSetArgSampler; if (nullptr != pfnSetArgSampler) { - result = pfnSetArgSampler(hKernel, argIndex, hArgValue); + result = pfnSetArgSampler(hKernel, argIndex, pProperties, hArgValue); } else { // generic implementation } diff --git a/source/common/ur_params.hpp b/source/common/ur_params.hpp index a4877f8ac6..93d40b786a 100644 --- a/source/common/ur_params.hpp +++ b/source/common/ur_params.hpp @@ -327,6 +327,12 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, const struct ur_program_native_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_value_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_local_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value); @@ -337,6 +343,15 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_exec_info_t value); inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_pointer_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_exec_info_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_sampler_properties_t params); +inline std::ostream & operator<<(std::ostream &os, const struct ur_kernel_arg_mem_obj_properties_t params); inline std::ostream & @@ -788,6 +803,26 @@ inline std::ostream &operator<<(std::ostream &os, os << "UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES"; break; + case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: + os << "UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES"; + break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: + os << "UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES"; + break; + + case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: + os << "UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES"; + break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: + os << "UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES"; + break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: + os << "UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; break; @@ -977,6 +1012,36 @@ inline void serializeStruct(std::ostream &os, const void *ptr) { ur_params::serializePtr(os, pstruct); } break; + case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: { + const ur_kernel_arg_pointer_properties_t *pstruct = + (const ur_kernel_arg_pointer_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: { + const ur_kernel_arg_sampler_properties_t *pstruct = + (const ur_kernel_arg_sampler_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: { + const ur_kernel_exec_info_properties_t *pstruct = + (const ur_kernel_exec_info_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: { + const ur_kernel_arg_value_properties_t *pstruct = + (const ur_kernel_arg_value_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: { + const ur_kernel_arg_local_properties_t *pstruct = + (const ur_kernel_arg_local_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr; @@ -7064,6 +7129,40 @@ operator<<(std::ostream &os, os << "}"; return os; } +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_value_properties_t params) { + os << "(struct ur_kernel_arg_value_properties_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << "}"; + return os; +} +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_local_properties_t params) { + os << "(struct ur_kernel_arg_local_properties_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << "}"; + return os; +} inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { switch (value) { @@ -7533,6 +7632,57 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } } // namespace ur_params inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_pointer_properties_t params) { + os << "(struct ur_kernel_arg_pointer_properties_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << "}"; + return os; +} +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_exec_info_properties_t params) { + os << "(struct ur_kernel_exec_info_properties_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << "}"; + return os; +} +inline std::ostream & +operator<<(std::ostream &os, + const struct ur_kernel_arg_sampler_properties_t params) { + os << "(struct ur_kernel_arg_sampler_properties_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << "}"; + return os; +} +inline std::ostream & operator<<(std::ostream &os, const struct ur_kernel_arg_mem_obj_properties_t params) { os << "(struct ur_kernel_arg_mem_obj_properties_t){"; @@ -12117,6 +12267,11 @@ operator<<(std::ostream &os, os << *(params->pargSize); + os << ", "; + os << ".pProperties = "; + + ur_params::serializePtr(os, *(params->ppProperties)); + os << ", "; os << ".pArgValue = "; @@ -12143,6 +12298,11 @@ operator<<(std::ostream &os, os << *(params->pargSize); + os << ", "; + os << ".pProperties = "; + + ur_params::serializePtr(os, *(params->ppProperties)); + return os; } @@ -12159,6 +12319,11 @@ operator<<(std::ostream &os, os << *(params->pargIndex); + os << ", "; + os << ".pProperties = "; + + ur_params::serializePtr(os, *(params->ppProperties)); + os << ", "; os << ".pArgValue = "; @@ -12185,6 +12350,11 @@ operator<<(std::ostream &os, os << *(params->ppropSize); + os << ", "; + os << ".pProperties = "; + + ur_params::serializePtr(os, *(params->ppProperties)); + os << ", "; os << ".pPropValue = "; ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), @@ -12206,6 +12376,11 @@ operator<<(std::ostream &os, os << *(params->pargIndex); + os << ", "; + os << ".pProperties = "; + + ur_params::serializePtr(os, *(params->ppProperties)); + os << ", "; os << ".hArgValue = "; diff --git a/source/loader/layers/tracing/ur_trcddi.cpp b/source/loader/layers/tracing/ur_trcddi.cpp index 935938b37e..138ec0157f 100644 --- a/source/loader/layers/tracing/ur_trcddi.cpp +++ b/source/loader/layers/tracing/ur_trcddi.cpp @@ -2247,6 +2247,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) { @@ -2257,11 +2259,12 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( } ur_kernel_set_arg_value_params_t params = {&hKernel, &argIndex, &argSize, - &pArgValue}; + &pProperties, &pArgValue}; uint64_t instance = context.notify_begin(UR_FUNCTION_KERNEL_SET_ARG_VALUE, "urKernelSetArgValue", ¶ms); - ur_result_t result = pfnSetArgValue(hKernel, argIndex, argSize, pArgValue); + ur_result_t result = + pfnSetArgValue(hKernel, argIndex, argSize, pProperties, pArgValue); context.notify_end(UR_FUNCTION_KERNEL_SET_ARG_VALUE, "urKernelSetArgValue", ¶ms, &result, instance); @@ -2275,7 +2278,9 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) { auto pfnSetArgLocal = context.urDdiTable.Kernel.pfnSetArgLocal; @@ -2283,11 +2288,13 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } - ur_kernel_set_arg_local_params_t params = {&hKernel, &argIndex, &argSize}; + ur_kernel_set_arg_local_params_t params = {&hKernel, &argIndex, &argSize, + &pProperties}; uint64_t instance = context.notify_begin(UR_FUNCTION_KERNEL_SET_ARG_LOCAL, "urKernelSetArgLocal", ¶ms); - ur_result_t result = pfnSetArgLocal(hKernel, argIndex, argSize); + ur_result_t result = + pfnSetArgLocal(hKernel, argIndex, argSize, pProperties); context.notify_end(UR_FUNCTION_KERNEL_SET_ARG_LOCAL, "urKernelSetArgLocal", ¶ms, &result, instance); @@ -2454,6 +2461,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelRelease( __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -2465,11 +2474,12 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( } ur_kernel_set_arg_pointer_params_t params = {&hKernel, &argIndex, - &pArgValue}; + &pProperties, &pArgValue}; uint64_t instance = context.notify_begin(UR_FUNCTION_KERNEL_SET_ARG_POINTER, "urKernelSetArgPointer", ¶ms); - ur_result_t result = pfnSetArgPointer(hKernel, argIndex, pArgValue); + ur_result_t result = + pfnSetArgPointer(hKernel, argIndex, pProperties, pArgValue); context.notify_end(UR_FUNCTION_KERNEL_SET_ARG_POINTER, "urKernelSetArgPointer", ¶ms, &result, instance); @@ -2483,6 +2493,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -2494,12 +2506,12 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( } ur_kernel_set_exec_info_params_t params = {&hKernel, &propName, &propSize, - &pPropValue}; + &pProperties, &pPropValue}; uint64_t instance = context.notify_begin(UR_FUNCTION_KERNEL_SET_EXEC_INFO, "urKernelSetExecInfo", ¶ms); ur_result_t result = - pfnSetExecInfo(hKernel, propName, propSize, pPropValue); + pfnSetExecInfo(hKernel, propName, propSize, pProperties, pPropValue); context.notify_end(UR_FUNCTION_KERNEL_SET_EXEC_INFO, "urKernelSetExecInfo", ¶ms, &result, instance); @@ -2512,6 +2524,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) { auto pfnSetArgSampler = context.urDdiTable.Kernel.pfnSetArgSampler; @@ -2521,11 +2535,12 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( } ur_kernel_set_arg_sampler_params_t params = {&hKernel, &argIndex, - &hArgValue}; + &pProperties, &hArgValue}; uint64_t instance = context.notify_begin(UR_FUNCTION_KERNEL_SET_ARG_SAMPLER, "urKernelSetArgSampler", ¶ms); - ur_result_t result = pfnSetArgSampler(hKernel, argIndex, hArgValue); + ur_result_t result = + pfnSetArgSampler(hKernel, argIndex, pProperties, hArgValue); context.notify_end(UR_FUNCTION_KERNEL_SET_ARG_SAMPLER, "urKernelSetArgSampler", ¶ms, &result, instance); diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 593e5418b2..92e7f4e205 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -2755,6 +2755,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) { @@ -2774,7 +2776,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( } } - ur_result_t result = pfnSetArgValue(hKernel, argIndex, argSize, pArgValue); + ur_result_t result = + pfnSetArgValue(hKernel, argIndex, argSize, pProperties, pArgValue); return result; } @@ -2785,7 +2788,9 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) { auto pfnSetArgLocal = context.urDdiTable.Kernel.pfnSetArgLocal; @@ -2799,7 +2804,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( } } - ur_result_t result = pfnSetArgLocal(hKernel, argIndex, argSize); + ur_result_t result = + pfnSetArgLocal(hKernel, argIndex, argSize, pProperties); return result; } @@ -2994,6 +3000,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelRelease( __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -3010,7 +3018,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( } } - ur_result_t result = pfnSetArgPointer(hKernel, argIndex, pArgValue); + ur_result_t result = + pfnSetArgPointer(hKernel, argIndex, pProperties, pArgValue); return result; } @@ -3021,6 +3030,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -3046,7 +3057,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( } ur_result_t result = - pfnSetExecInfo(hKernel, propName, propSize, pPropValue); + pfnSetExecInfo(hKernel, propName, propSize, pProperties, pPropValue); return result; } @@ -3056,6 +3067,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) { auto pfnSetArgSampler = context.urDdiTable.Kernel.pfnSetArgSampler; @@ -3074,7 +3087,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( } } - ur_result_t result = pfnSetArgSampler(hKernel, argIndex, hArgValue); + ur_result_t result = + pfnSetArgSampler(hKernel, argIndex, pProperties, hArgValue); return result; } diff --git a/source/loader/ur_ldrddi.cpp b/source/loader/ur_ldrddi.cpp index 8a2a7f4f85..f6444095b1 100644 --- a/source/loader/ur_ldrddi.cpp +++ b/source/loader/ur_ldrddi.cpp @@ -2606,6 +2606,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) { @@ -2622,7 +2624,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue( hKernel = reinterpret_cast(hKernel)->handle; // forward to device-platform - result = pfnSetArgValue(hKernel, argIndex, argSize, pArgValue); + result = pfnSetArgValue(hKernel, argIndex, argSize, pProperties, pArgValue); return result; } @@ -2633,7 +2635,9 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -2648,7 +2652,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgLocal( hKernel = reinterpret_cast(hKernel)->handle; // forward to device-platform - result = pfnSetArgLocal(hKernel, argIndex, argSize); + result = pfnSetArgLocal(hKernel, argIndex, argSize, pProperties); return result; } @@ -2813,6 +2817,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelRelease( __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -2830,7 +2836,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer( hKernel = reinterpret_cast(hKernel)->handle; // forward to device-platform - result = pfnSetArgPointer(hKernel, argIndex, pArgValue); + result = pfnSetArgPointer(hKernel, argIndex, pProperties, pArgValue); return result; } @@ -2841,6 +2847,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -2858,7 +2866,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( hKernel = reinterpret_cast(hKernel)->handle; // forward to device-platform - result = pfnSetExecInfo(hKernel, propName, propSize, pPropValue); + result = + pfnSetExecInfo(hKernel, propName, propSize, pProperties, pPropValue); return result; } @@ -2868,6 +2877,8 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetExecInfo( __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -2886,7 +2897,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler( hArgValue = reinterpret_cast(hArgValue)->handle; // forward to device-platform - result = pfnSetArgSampler(hKernel, argIndex, hArgValue); + result = pfnSetArgSampler(hKernel, argIndex, pProperties, hArgValue); return result; } diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index b47ff9b8f1..4f396ef2c3 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -2994,6 +2994,8 @@ ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) try { @@ -3002,7 +3004,7 @@ ur_result_t UR_APICALL urKernelSetArgValue( return UR_RESULT_ERROR_UNINITIALIZED; } - return pfnSetArgValue(hKernel, argIndex, argSize, pArgValue); + return pfnSetArgValue(hKernel, argIndex, argSize, pProperties, pArgValue); } catch (...) { return exceptionToResult(std::current_exception()); } @@ -3027,14 +3029,16 @@ ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) try { auto pfnSetArgLocal = ur_lib::context->urDdiTable.Kernel.pfnSetArgLocal; if (nullptr == pfnSetArgLocal) { return UR_RESULT_ERROR_UNINITIALIZED; } - return pfnSetArgLocal(hKernel, argIndex, argSize); + return pfnSetArgLocal(hKernel, argIndex, argSize, pProperties); } catch (...) { return exceptionToResult(std::current_exception()); } @@ -3254,6 +3258,8 @@ ur_result_t UR_APICALL urKernelRelease( ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -3263,7 +3269,7 @@ ur_result_t UR_APICALL urKernelSetArgPointer( return UR_RESULT_ERROR_UNINITIALIZED; } - return pfnSetArgPointer(hKernel, argIndex, pArgValue); + return pfnSetArgPointer(hKernel, argIndex, pProperties, pArgValue); } catch (...) { return exceptionToResult(std::current_exception()); } @@ -3294,6 +3300,8 @@ ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -3303,7 +3311,7 @@ ur_result_t UR_APICALL urKernelSetExecInfo( return UR_RESULT_ERROR_UNINITIALIZED; } - return pfnSetExecInfo(hKernel, propName, propSize, pPropValue); + return pfnSetExecInfo(hKernel, propName, propSize, pProperties, pPropValue); } catch (...) { return exceptionToResult(std::current_exception()); } @@ -3327,6 +3335,8 @@ ur_result_t UR_APICALL urKernelSetExecInfo( ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) try { auto pfnSetArgSampler = ur_lib::context->urDdiTable.Kernel.pfnSetArgSampler; @@ -3334,7 +3344,7 @@ ur_result_t UR_APICALL urKernelSetArgSampler( return UR_RESULT_ERROR_UNINITIALIZED; } - return pfnSetArgSampler(hKernel, argIndex, hArgValue); + return pfnSetArgSampler(hKernel, argIndex, pProperties, hArgValue); } catch (...) { return exceptionToResult(std::current_exception()); } diff --git a/source/ur_api.cpp b/source/ur_api.cpp index e511ee4554..6ce52ff2e5 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -2500,6 +2500,8 @@ ur_result_t UR_APICALL urKernelSetArgValue( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t + *pProperties, ///< [in][optional] pointer to value properties. const void *pArgValue ///< [in] argument value represented as matching arg type. ) { @@ -2527,7 +2529,9 @@ ur_result_t UR_APICALL urKernelSetArgLocal( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] size_t - argSize ///< [in] size of the local buffer to be allocated by the runtime + argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t + *pProperties ///< [in][optional] pointer to local buffer properties. ) { ur_result_t result = UR_RESULT_SUCCESS; return result; @@ -2715,6 +2719,8 @@ ur_result_t UR_APICALL urKernelRelease( ur_result_t UR_APICALL urKernelSetArgPointer( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t + *pProperties, ///< [in][optional] pointer to USM pointer properties. const void * pArgValue ///< [in][optional] USM pointer to memory location holding the argument ///< value. If null then argument value is considered null. @@ -2749,6 +2755,8 @@ ur_result_t UR_APICALL urKernelSetExecInfo( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t + *pProperties, ///< [in][optional] pointer to execution info properties. const void * pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding ///< the property value. @@ -2776,6 +2784,8 @@ ur_result_t UR_APICALL urKernelSetExecInfo( ur_result_t UR_APICALL urKernelSetArgSampler( ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t + *pProperties, ///< [in][optional] pointer to sampler properties. ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. ) { ur_result_t result = UR_RESULT_SUCCESS; diff --git a/test/conformance/kernel/urKernelSetArgLocal.cpp b/test/conformance/kernel/urKernelSetArgLocal.cpp index 08b6c7c8c9..3b44c31ea7 100644 --- a/test/conformance/kernel/urKernelSetArgLocal.cpp +++ b/test/conformance/kernel/urKernelSetArgLocal.cpp @@ -15,12 +15,12 @@ struct urKernelSetArgLocalTest : uur::urKernelTest { UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urKernelSetArgLocalTest); TEST_P(urKernelSetArgLocalTest, Success) { - ASSERT_SUCCESS(urKernelSetArgLocal(kernel, 1, local_mem_size)); + ASSERT_SUCCESS(urKernelSetArgLocal(kernel, 1, local_mem_size, nullptr)); } TEST_P(urKernelSetArgLocalTest, InvalidNullHandleKernel) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, - urKernelSetArgLocal(nullptr, 1, local_mem_size)); + urKernelSetArgLocal(nullptr, 1, local_mem_size, nullptr)); } TEST_P(urKernelSetArgLocalTest, InvalidKernelArgumentIndex) { @@ -28,7 +28,7 @@ TEST_P(urKernelSetArgLocalTest, InvalidKernelArgumentIndex) { ASSERT_SUCCESS(urKernelGetInfo(kernel, UR_KERNEL_INFO_NUM_ARGS, sizeof(num_kernel_args), &num_kernel_args, nullptr)); - ASSERT_EQ_RESULT( - UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, - urKernelSetArgLocal(kernel, num_kernel_args + 1, local_mem_size)); + ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, + urKernelSetArgLocal(kernel, num_kernel_args + 1, + local_mem_size, nullptr)); } diff --git a/test/conformance/kernel/urKernelSetArgPointer.cpp b/test/conformance/kernel/urKernelSetArgPointer.cpp index 643a12be92..dfe1085990 100644 --- a/test/conformance/kernel/urKernelSetArgPointer.cpp +++ b/test/conformance/kernel/urKernelSetArgPointer.cpp @@ -42,7 +42,7 @@ TEST_P(urKernelSetArgPointerTest, SuccessHost) { &allocation)); ASSERT_NE(allocation, nullptr); - ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, &allocation)); + ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation)); ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data)); Launch1DRange(array_size); ValidateAllocation(allocation); @@ -59,7 +59,7 @@ TEST_P(urKernelSetArgPointerTest, SuccessDevice) { allocation_size, &allocation)); ASSERT_NE(allocation, nullptr); - ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, &allocation)); + ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation)); ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data)); Launch1DRange(array_size); @@ -85,7 +85,7 @@ TEST_P(urKernelSetArgPointerTest, SuccessShared) { allocation_size, &allocation)); ASSERT_NE(allocation, nullptr); - ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, &allocation)); + ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation)); ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data)); Launch1DRange(array_size); ValidateAllocation(allocation); @@ -135,7 +135,7 @@ UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urKernelSetArgPointerNegativeTest); TEST_P(urKernelSetArgPointerNegativeTest, InvalidNullHandleKernel) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, - urKernelSetArgPointer(nullptr, 0, &allocation)); + urKernelSetArgPointer(nullptr, 0, nullptr, &allocation)); } TEST_P(urKernelSetArgPointerNegativeTest, InvalidKernelArgumentIndex) { @@ -144,7 +144,7 @@ TEST_P(urKernelSetArgPointerNegativeTest, InvalidKernelArgumentIndex) { sizeof(num_kernel_args), &num_kernel_args, nullptr)); - ASSERT_EQ_RESULT( - UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, - urKernelSetArgPointer(kernel, num_kernel_args + 1, &allocation)); + ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, + urKernelSetArgPointer(kernel, num_kernel_args + 1, nullptr, + &allocation)); } diff --git a/test/conformance/kernel/urKernelSetArgSampler.cpp b/test/conformance/kernel/urKernelSetArgSampler.cpp index c914b410dc..4a044383ff 100644 --- a/test/conformance/kernel/urKernelSetArgSampler.cpp +++ b/test/conformance/kernel/urKernelSetArgSampler.cpp @@ -31,17 +31,17 @@ struct urKernelSetArgSamplerTest : uur::urKernelTest { UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urKernelSetArgSamplerTest); TEST_P(urKernelSetArgSamplerTest, Success) { - ASSERT_SUCCESS(urKernelSetArgSampler(kernel, 2, sampler)); + ASSERT_SUCCESS(urKernelSetArgSampler(kernel, 2, nullptr, sampler)); } TEST_P(urKernelSetArgSamplerTest, InvalidNullHandleKernel) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, - urKernelSetArgSampler(nullptr, 2, sampler)); + urKernelSetArgSampler(nullptr, 2, nullptr, sampler)); } TEST_P(urKernelSetArgSamplerTest, InvalidNullHandleArgValue) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, - urKernelSetArgSampler(kernel, 2, nullptr)); + urKernelSetArgSampler(kernel, 2, nullptr, nullptr)); } TEST_P(urKernelSetArgSamplerTest, InvalidKernelArgumentIndex) { @@ -51,5 +51,5 @@ TEST_P(urKernelSetArgSamplerTest, InvalidKernelArgumentIndex) { nullptr)); ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, - urKernelSetArgSampler(kernel, num_kernel_args + 1, sampler)); + urKernelSetArgSampler(kernel, num_kernel_args + 1, nullptr, sampler)); } diff --git a/test/conformance/kernel/urKernelSetArgValue.cpp b/test/conformance/kernel/urKernelSetArgValue.cpp index cf0d22117a..d66f76944b 100644 --- a/test/conformance/kernel/urKernelSetArgValue.cpp +++ b/test/conformance/kernel/urKernelSetArgValue.cpp @@ -17,19 +17,19 @@ UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urKernelSetArgValueTest); TEST_P(urKernelSetArgValueTest, Success) { ASSERT_SUCCESS( - urKernelSetArgValue(kernel, 2, sizeof(arg_value), &arg_value)); + urKernelSetArgValue(kernel, 2, sizeof(arg_value), nullptr, &arg_value)); } TEST_P(urKernelSetArgValueTest, InvalidNullHandleKernel) { - ASSERT_EQ_RESULT( - UR_RESULT_ERROR_INVALID_NULL_HANDLE, - urKernelSetArgValue(nullptr, 2, sizeof(arg_value), &arg_value)); + ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, + urKernelSetArgValue(nullptr, 2, sizeof(arg_value), nullptr, + &arg_value)); } TEST_P(urKernelSetArgValueTest, InvalidNullPointerArgValue) { ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_NULL_POINTER, - urKernelSetArgValue(kernel, 2, sizeof(arg_value), nullptr)); + urKernelSetArgValue(kernel, 2, sizeof(arg_value), nullptr, nullptr)); } TEST_P(urKernelSetArgValueTest, InvalidKernelArgumentIndex) { @@ -40,10 +40,11 @@ TEST_P(urKernelSetArgValueTest, InvalidKernelArgumentIndex) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, urKernelSetArgValue(kernel, num_kernel_args + 1, - sizeof(arg_value), &arg_value)); + sizeof(arg_value), nullptr, + &arg_value)); } TEST_P(urKernelSetArgValueTest, InvalidKernelArgumentSize) { ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE, - urKernelSetArgValue(kernel, 2, 0, &arg_value)); + urKernelSetArgValue(kernel, 2, 0, nullptr, &arg_value)); } diff --git a/test/conformance/kernel/urKernelSetExecInfo.cpp b/test/conformance/kernel/urKernelSetExecInfo.cpp index cd7b6bd4cd..aa1a2c1088 100644 --- a/test/conformance/kernel/urKernelSetExecInfo.cpp +++ b/test/conformance/kernel/urKernelSetExecInfo.cpp @@ -12,7 +12,7 @@ TEST_P(urKernelSetExecInfoTest, SuccessIndirectAccess) { bool property_value = false; ASSERT_SUCCESS( urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS, - sizeof(property_value), &property_value)); + sizeof(property_value), nullptr, &property_value)); } TEST_P(urKernelSetExecInfoTest, InvalidNullHandleKernel) { @@ -20,7 +20,7 @@ TEST_P(urKernelSetExecInfoTest, InvalidNullHandleKernel) { ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_NULL_HANDLE, urKernelSetExecInfo(nullptr, UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS, - sizeof(property_value), &property_value)); + sizeof(property_value), nullptr, &property_value)); } TEST_P(urKernelSetExecInfoTest, InvalidEnumeration) { @@ -28,7 +28,7 @@ TEST_P(urKernelSetExecInfoTest, InvalidEnumeration) { ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_ENUMERATION, urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_FORCE_UINT32, - sizeof(property_value), &property_value)); + sizeof(property_value), nullptr, &property_value)); } TEST_P(urKernelSetExecInfoTest, InvalidNullPointerPropValue) { @@ -36,7 +36,7 @@ TEST_P(urKernelSetExecInfoTest, InvalidNullPointerPropValue) { ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_NULL_POINTER, urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS, - sizeof(property_value), nullptr)); + sizeof(property_value), nullptr, nullptr)); } struct urKernelSetExecInfoUSMPointersTest : uur::urKernelTest { @@ -70,7 +70,7 @@ TEST_P(urKernelSetExecInfoUSMPointersTest, SuccessHost) { void *pointers[] = {allocation}; ASSERT_SUCCESS(urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_USM_PTRS, - sizeof(pointers), pointers)); + sizeof(pointers), nullptr, pointers)); } TEST_P(urKernelSetExecInfoUSMPointersTest, SuccessDevice) { @@ -86,7 +86,7 @@ TEST_P(urKernelSetExecInfoUSMPointersTest, SuccessDevice) { void *pointers[] = {allocation}; ASSERT_SUCCESS(urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_USM_PTRS, - sizeof(pointers), pointers)); + sizeof(pointers), nullptr, pointers)); } TEST_P(urKernelSetExecInfoUSMPointersTest, SuccessShared) { @@ -103,7 +103,7 @@ TEST_P(urKernelSetExecInfoUSMPointersTest, SuccessShared) { void *pointers[] = {allocation}; ASSERT_SUCCESS(urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_USM_PTRS, - sizeof(pointers), pointers)); + sizeof(pointers), nullptr, pointers)); } using urKernelSetExecInfoCacheConfigTest = @@ -118,6 +118,6 @@ UUR_TEST_SUITE_P(urKernelSetExecInfoCacheConfigTest, TEST_P(urKernelSetExecInfoCacheConfigTest, Success) { auto property_value = getParam(); ASSERT_SUCCESS(urKernelSetExecInfo(kernel, UR_KERNEL_EXEC_INFO_CACHE_CONFIG, - sizeof(property_value), + sizeof(property_value), nullptr, &property_value)); } diff --git a/test/conformance/testing/include/uur/fixtures.h b/test/conformance/testing/include/uur/fixtures.h index 8c7adcd2e9..249fc795b5 100644 --- a/test/conformance/testing/include/uur/fixtures.h +++ b/test/conformance/testing/include/uur/fixtures.h @@ -704,7 +704,8 @@ struct urKernelExecutionTest : urKernelTest { size_t offsets[1] = {0}; } accessor; ASSERT_SUCCESS(urKernelSetArgValue(kernel, current_arg_index + 1, - sizeof(accessor), &accessor)); + sizeof(accessor), nullptr, + &accessor)); current_arg_index += 2; buffer_args.push_back(mem_handle); @@ -713,7 +714,7 @@ struct urKernelExecutionTest : urKernelTest { template void AddPodArg(T data) { ASSERT_SUCCESS(urKernelSetArgValue(kernel, current_arg_index, - sizeof(data), &data)); + sizeof(data), nullptr, &data)); current_arg_index++; }