@@ -223,6 +223,7 @@ typedef enum ur_function_t {
223223 UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP = 221, ///< Enumerator for ::urCommandBufferGetInfoExp
224224 UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP = 222, ///< Enumerator for ::urCommandBufferCommandGetInfoExp
225225 UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP = 223, ///< Enumerator for ::urEnqueueTimestampRecordingExp
226+ UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP = 224, ///< Enumerator for ::urEnqueueKernelLaunchCustomExp
226227 /// @cond
227228 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
228229 /// @endcond
@@ -8935,6 +8936,133 @@ urEnqueueTimestampRecordingExp(
89358936 ///< reports the timestamp recorded when the command is executed on the device.
89368937);
89378938
8939+ #if !defined(__GNUC__)
8940+ #pragma endregion
8941+ #endif
8942+ // Intel 'oneAPI' Unified Runtime Experimental APIs for (kernel) Launch Properties
8943+ #if !defined(__GNUC__)
8944+ #pragma region launch properties(experimental)
8945+ #endif
8946+ ///////////////////////////////////////////////////////////////////////////////
8947+ #ifndef UR_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP
8948+ /// @brief The extension string that defines support for the Launch Properties
8949+ /// extension, which is returned when querying device extensions.
8950+ #define UR_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP "ur_exp_launch_properties"
8951+ #endif // UR_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP
8952+
8953+ ///////////////////////////////////////////////////////////////////////////////
8954+ /// @brief Specifies a launch property id
8955+ ///
8956+ /// @remarks
8957+ /// _Analogues_
8958+ /// - **CUlaunchAttributeID**
8959+ typedef enum ur_exp_launch_property_id_t {
8960+ UR_EXP_LAUNCH_PROPERTY_ID_IGNORE = 0, ///< The property has no effect
8961+ UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE = 1, ///< Whether to launch a cooperative kernel
8962+ UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION = 2, ///< work-group cluster dimensions
8963+ /// @cond
8964+ UR_EXP_LAUNCH_PROPERTY_ID_FORCE_UINT32 = 0x7fffffff
8965+ /// @endcond
8966+
8967+ } ur_exp_launch_property_id_t;
8968+
8969+ ///////////////////////////////////////////////////////////////////////////////
8970+ /// @brief Specifies a launch property value
8971+ ///
8972+ /// @remarks
8973+ /// _Analogues_
8974+ /// - **CUlaunchAttributeValue**
8975+ typedef union ur_exp_launch_property_value_t {
8976+ uint32_t clusterDim[3]; ///< [in] dimensions of the cluster (units of work-group) (x, y, z). Each
8977+ ///< value must be a divisor of the corresponding global work-size
8978+ ///< dimension (in units of work-group).
8979+ int cooperative; ///< [in] non-zero value indicates a cooperative kernel
8980+
8981+ } ur_exp_launch_property_value_t;
8982+
8983+ ///////////////////////////////////////////////////////////////////////////////
8984+ /// @brief Kernel launch property
8985+ ///
8986+ /// @remarks
8987+ /// _Analogues_
8988+ /// - **cuLaunchAttribute**
8989+ typedef struct ur_exp_launch_property_t {
8990+ ur_exp_launch_property_id_t id; ///< [in] launch property id
8991+ ur_exp_launch_property_value_t value; ///< [in][tagged_by(id)] launch property value
8992+
8993+ } ur_exp_launch_property_t;
8994+
8995+ ///////////////////////////////////////////////////////////////////////////////
8996+ /// @brief Launch kernel with custom launch properties
8997+ ///
8998+ /// @details
8999+ /// - Launches the kernel using the specified launch properties
9000+ /// - If numPropsInLaunchPropList == 0 then a regular kernel launch is used:
9001+ /// `urEnqueueKernelLaunch`
9002+ /// - Consult the appropriate adapter driver documentation for details of
9003+ /// adapter specific behavior and native error codes that may be returned.
9004+ ///
9005+ /// @remarks
9006+ /// _Analogues_
9007+ /// - **cuLaunchKernelEx**
9008+ ///
9009+ /// @returns
9010+ /// - ::UR_RESULT_SUCCESS
9011+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
9012+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
9013+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
9014+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
9015+ /// + `NULL == hQueue`
9016+ /// + `NULL == hKernel`
9017+ /// + NULL == hQueue
9018+ /// + NULL == hKernel
9019+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
9020+ /// + `NULL == pGlobalWorkSize`
9021+ /// + `NULL == launchPropList`
9022+ /// + NULL == pGlobalWorkSize
9023+ /// + numPropsInLaunchpropList != 0 && launchPropList == NULL
9024+ /// - ::UR_RESULT_SUCCESS
9025+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
9026+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
9027+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
9028+ /// - ::UR_RESULT_ERROR_INVALID_QUEUE
9029+ /// - ::UR_RESULT_ERROR_INVALID_KERNEL
9030+ /// - ::UR_RESULT_ERROR_INVALID_EVENT
9031+ /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
9032+ /// + phEventWaitList == NULL && numEventsInWaitList > 0
9033+ /// + phEventWaitList != NULL && numEventsInWaitList == 0
9034+ /// + If event objects in phEventWaitList are not valid events.
9035+ /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS
9036+ /// + An event in phEventWaitList has ::UR_EVENT_STATUS_ERROR
9037+ /// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION
9038+ /// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
9039+ /// - ::UR_RESULT_ERROR_INVALID_VALUE
9040+ /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
9041+ /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
9042+ UR_APIEXPORT ur_result_t UR_APICALL
9043+ urEnqueueKernelLaunchCustomExp(
9044+ ur_queue_handle_t hQueue, ///< [in] handle of the queue object
9045+ ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
9046+ uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and
9047+ ///< work-group work-items
9048+ const size_t *pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the
9049+ ///< number of global work-items in workDim that will execute the kernel
9050+ ///< function
9051+ const size_t *pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that
9052+ ///< specify the number of local work-items forming a work-group that will
9053+ ///< execute the kernel function. If nullptr, the runtime implementation
9054+ ///< will choose the work-group size.
9055+ uint32_t numPropsInLaunchPropList, ///< [in] size of the launch prop list
9056+ const ur_exp_launch_property_t *launchPropList, ///< [in][range(0, numPropsInLaunchPropList)] pointer to a list of launch
9057+ ///< properties
9058+ uint32_t numEventsInWaitList, ///< [in] size of the event wait list
9059+ const ur_event_handle_t *phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of
9060+ ///< events that must be complete before the kernel execution. If nullptr,
9061+ ///< the numEventsInWaitList must be 0, indicating that no wait event.
9062+ ur_event_handle_t *phEvent ///< [out][optional] return an event object that identifies this particular
9063+ ///< kernel execution instance.
9064+ );
9065+
89389066#if !defined(__GNUC__)
89399067#pragma endregion
89409068#endif
@@ -10629,6 +10757,23 @@ typedef struct ur_enqueue_write_host_pipe_params_t {
1062910757 ur_event_handle_t **pphEvent;
1063010758} ur_enqueue_write_host_pipe_params_t;
1063110759
10760+ ///////////////////////////////////////////////////////////////////////////////
10761+ /// @brief Function parameters for urEnqueueKernelLaunchCustomExp
10762+ /// @details Each entry is a pointer to the parameter passed to the function;
10763+ /// allowing the callback the ability to modify the parameter's value
10764+ typedef struct ur_enqueue_kernel_launch_custom_exp_params_t {
10765+ ur_queue_handle_t *phQueue;
10766+ ur_kernel_handle_t *phKernel;
10767+ uint32_t *pworkDim;
10768+ const size_t **ppGlobalWorkSize;
10769+ const size_t **ppLocalWorkSize;
10770+ uint32_t *pnumPropsInLaunchPropList;
10771+ const ur_exp_launch_property_t **plaunchPropList;
10772+ uint32_t *pnumEventsInWaitList;
10773+ const ur_event_handle_t **pphEventWaitList;
10774+ ur_event_handle_t **pphEvent;
10775+ } ur_enqueue_kernel_launch_custom_exp_params_t;
10776+
1063210777///////////////////////////////////////////////////////////////////////////////
1063310778/// @brief Function parameters for urEnqueueCooperativeKernelLaunchExp
1063410779/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments