@@ -205,6 +205,9 @@ typedef enum ur_function_t {
205205    UR_FUNCTION_ADAPTER_RETAIN = 179,                                          ///< Enumerator for ::urAdapterRetain
206206    UR_FUNCTION_ADAPTER_GET_LAST_ERROR = 180,                                  ///< Enumerator for ::urAdapterGetLastError
207207    UR_FUNCTION_ADAPTER_GET_INFO = 181,                                        ///< Enumerator for ::urAdapterGetInfo
208+     UR_FUNCTION_PROGRAM_BUILD_EXP = 197,                                       ///< Enumerator for ::urProgramBuildExp
209+     UR_FUNCTION_PROGRAM_COMPILE_EXP = 198,                                     ///< Enumerator for ::urProgramCompileExp
210+     UR_FUNCTION_PROGRAM_LINK_EXP = 199,                                        ///< Enumerator for ::urProgramLinkExp
208211    /// @cond
209212    UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
210213    /// @endcond
@@ -8025,6 +8028,131 @@ urCommandBufferEnqueueExp(
80258028                                                   ///< command-buffer execution instance.
80268029);
80278030
8031+ #if !defined(__GNUC__)
8032+ #pragma endregion
8033+ #endif
8034+ // Intel 'oneAPI' Unified Runtime Experimental APIs for multi-device compile
8035+ #if !defined(__GNUC__)
8036+ #pragma region multi device compile(experimental)
8037+ #endif
8038+ ///////////////////////////////////////////////////////////////////////////////
8039+ #ifndef UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8040+ /// @brief The extension string which defines support for test
8041+ ///        which is returned when querying device extensions.
8042+ #define UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP "ur_exp_multi_device_compile"
8043+ #endif // UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8044+ 
8045+ ///////////////////////////////////////////////////////////////////////////////
8046+ /// @brief Produces an executable program from one program, negates need for the
8047+ ///        linking step.
8048+ ///
8049+ /// @details
8050+ ///     - The application may call this function from simultaneous threads.
8051+ ///     - Following a successful call to this entry point, the program passed
8052+ ///       will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
8053+ ///       for each device in `phDevices`.
8054+ ///
8055+ /// @remarks
8056+ ///   _Analogues_
8057+ ///     - **clBuildProgram**
8058+ ///
8059+ /// @returns
8060+ ///     - ::UR_RESULT_SUCCESS
8061+ ///     - ::UR_RESULT_ERROR_UNINITIALIZED
8062+ ///     - ::UR_RESULT_ERROR_DEVICE_LOST
8063+ ///     - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8064+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8065+ ///         + `NULL == hProgram`
8066+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8067+ ///         + `NULL == phDevices`
8068+ ///     - ::UR_RESULT_ERROR_INVALID_PROGRAM
8069+ ///         + If `hProgram` isn't a valid program object.
8070+ ///     - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8071+ ///         + If an error occurred when building `hProgram`.
8072+ UR_APIEXPORT ur_result_t UR_APICALL
8073+ urProgramBuildExp(
8074+     ur_program_handle_t hProgram,  ///< [in] Handle of the program to build.
8075+     uint32_t numDevices,           ///< [in] number of devices
8076+     ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8077+     const char *pOptions           ///< [in][optional] pointer to build options null-terminated string.
8078+ );
8079+ 
8080+ ///////////////////////////////////////////////////////////////////////////////
8081+ /// @brief Produces an executable program from one or more programs.
8082+ ///
8083+ /// @details
8084+ ///     - The application may call this function from simultaneous threads.
8085+ ///     - Following a successful call to this entry point `hProgram` will
8086+ ///       contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type
8087+ ///       for each device in `phDevices`.
8088+ ///
8089+ /// @remarks
8090+ ///   _Analogues_
8091+ ///     - **clCompileProgram**
8092+ ///
8093+ /// @returns
8094+ ///     - ::UR_RESULT_SUCCESS
8095+ ///     - ::UR_RESULT_ERROR_UNINITIALIZED
8096+ ///     - ::UR_RESULT_ERROR_DEVICE_LOST
8097+ ///     - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8098+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8099+ ///         + `NULL == hProgram`
8100+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8101+ ///         + `NULL == phDevices`
8102+ ///     - ::UR_RESULT_ERROR_INVALID_PROGRAM
8103+ ///         + If `hProgram` isn't a valid program object.
8104+ ///     - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8105+ ///         + If an error occurred while compiling `hProgram`.
8106+ UR_APIEXPORT ur_result_t UR_APICALL
8107+ urProgramCompileExp(
8108+     ur_program_handle_t hProgram,  ///< [in][out] handle of the program to compile.
8109+     uint32_t numDevices,           ///< [in] number of devices
8110+     ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8111+     const char *pOptions           ///< [in][optional] pointer to build options null-terminated string.
8112+ );
8113+ 
8114+ ///////////////////////////////////////////////////////////////////////////////
8115+ /// @brief Produces an executable program from one or more programs.
8116+ ///
8117+ /// @details
8118+ ///     - The application may call this function from simultaneous threads.
8119+ ///     - Following a successful call to this entry point the program returned
8120+ ///       in `phProgram` will contain a binary of the
8121+ ///       ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type for each device in
8122+ ///       `phDevices`.
8123+ ///
8124+ /// @remarks
8125+ ///   _Analogues_
8126+ ///     - **clLinkProgram**
8127+ ///
8128+ /// @returns
8129+ ///     - ::UR_RESULT_SUCCESS
8130+ ///     - ::UR_RESULT_ERROR_UNINITIALIZED
8131+ ///     - ::UR_RESULT_ERROR_DEVICE_LOST
8132+ ///     - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8133+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8134+ ///         + `NULL == hContext`
8135+ ///     - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8136+ ///         + `NULL == phDevices`
8137+ ///         + `NULL == phPrograms`
8138+ ///         + `NULL == phProgram`
8139+ ///     - ::UR_RESULT_ERROR_INVALID_PROGRAM
8140+ ///         + If one of the programs in `phPrograms` isn't a valid program object.
8141+ ///     - ::UR_RESULT_ERROR_INVALID_SIZE
8142+ ///         + `count == 0`
8143+ ///     - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE
8144+ ///         + If an error occurred while linking `phPrograms`.
8145+ UR_APIEXPORT ur_result_t UR_APICALL
8146+ urProgramLinkExp(
8147+     ur_context_handle_t hContext,          ///< [in] handle of the context instance.
8148+     uint32_t numDevices,                   ///< [in] number of devices
8149+     ur_device_handle_t *phDevices,         ///< [in][range(0, numDevices)] pointer to array of device handles
8150+     uint32_t count,                        ///< [in] number of program handles in `phPrograms`.
8151+     const ur_program_handle_t *phPrograms, ///< [in][range(0, count)] pointer to array of program handles.
8152+     const char *pOptions,                  ///< [in][optional] pointer to linker options null-terminated string.
8153+     ur_program_handle_t *phProgram         ///< [out] pointer to handle of program object created.
8154+ );
8155+ 
80288156#if !defined(__GNUC__)
80298157#pragma endregion
80308158#endif
@@ -8526,6 +8654,17 @@ typedef struct ur_program_build_params_t {
85268654    const char **ppOptions;
85278655} ur_program_build_params_t;
85288656
8657+ ///////////////////////////////////////////////////////////////////////////////
8658+ /// @brief Function parameters for urProgramBuildExp
8659+ /// @details Each entry is a pointer to the parameter passed to the function;
8660+ ///     allowing the callback the ability to modify the parameter's value
8661+ typedef struct ur_program_build_exp_params_t {
8662+     ur_program_handle_t *phProgram;
8663+     uint32_t *pnumDevices;
8664+     ur_device_handle_t **pphDevices;
8665+     const char **ppOptions;
8666+ } ur_program_build_exp_params_t;
8667+ 
85298668///////////////////////////////////////////////////////////////////////////////
85308669/// @brief Function parameters for urProgramCompile
85318670/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8536,6 +8675,17 @@ typedef struct ur_program_compile_params_t {
85368675    const char **ppOptions;
85378676} ur_program_compile_params_t;
85388677
8678+ ///////////////////////////////////////////////////////////////////////////////
8679+ /// @brief Function parameters for urProgramCompileExp
8680+ /// @details Each entry is a pointer to the parameter passed to the function;
8681+ ///     allowing the callback the ability to modify the parameter's value
8682+ typedef struct ur_program_compile_exp_params_t {
8683+     ur_program_handle_t *phProgram;
8684+     uint32_t *pnumDevices;
8685+     ur_device_handle_t **pphDevices;
8686+     const char **ppOptions;
8687+ } ur_program_compile_exp_params_t;
8688+ 
85398689///////////////////////////////////////////////////////////////////////////////
85408690/// @brief Function parameters for urProgramLink
85418691/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8548,6 +8698,20 @@ typedef struct ur_program_link_params_t {
85488698    ur_program_handle_t **pphProgram;
85498699} ur_program_link_params_t;
85508700
8701+ ///////////////////////////////////////////////////////////////////////////////
8702+ /// @brief Function parameters for urProgramLinkExp
8703+ /// @details Each entry is a pointer to the parameter passed to the function;
8704+ ///     allowing the callback the ability to modify the parameter's value
8705+ typedef struct ur_program_link_exp_params_t {
8706+     ur_context_handle_t *phContext;
8707+     uint32_t *pnumDevices;
8708+     ur_device_handle_t **pphDevices;
8709+     uint32_t *pcount;
8710+     const ur_program_handle_t **pphPrograms;
8711+     const char **ppOptions;
8712+     ur_program_handle_t **pphProgram;
8713+ } ur_program_link_exp_params_t;
8714+ 
85518715///////////////////////////////////////////////////////////////////////////////
85528716/// @brief Function parameters for urProgramRetain
85538717/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments