@@ -205,7 +205,9 @@ typedef enum ur_function_t {
205
205
UR_FUNCTION_ADAPTER_RETAIN = 179, ///< Enumerator for ::urAdapterRetain
206
206
UR_FUNCTION_ADAPTER_GET_LAST_ERROR = 180, ///< Enumerator for ::urAdapterGetLastError
207
207
UR_FUNCTION_ADAPTER_GET_INFO = 181, ///< Enumerator for ::urAdapterGetInfo
208
- UR_FUNCTION_PROGRAM_BUILD_EXP = 182, ///< Enumerator for ::urProgramBuildExp
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
209
211
/// @cond
210
212
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
211
213
/// @endcond
@@ -4001,43 +4003,6 @@ urProgramBuild(
4001
4003
const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4002
4004
);
4003
4005
4004
- ///////////////////////////////////////////////////////////////////////////////
4005
- /// @brief Produces an executable program from one program, negates need for the
4006
- /// linking step.
4007
- ///
4008
- /// @details
4009
- /// - The application may call this function from simultaneous threads.
4010
- /// - Following a successful call to this entry point, the program passed
4011
- /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
4012
- /// for each device in `hContext`.
4013
- ///
4014
- /// @remarks
4015
- /// _Analogues_
4016
- /// - **clBuildProgram**
4017
- ///
4018
- /// @returns
4019
- /// - ::UR_RESULT_SUCCESS
4020
- /// - ::UR_RESULT_ERROR_UNINITIALIZED
4021
- /// - ::UR_RESULT_ERROR_DEVICE_LOST
4022
- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4023
- /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4024
- /// + `NULL == hContext`
4025
- /// + `NULL == hProgram`
4026
- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4027
- /// + `NULL == phDevices`
4028
- /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
4029
- /// + If `hProgram` isn't a valid program object.
4030
- /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
4031
- /// + If an error occurred when building `hProgram`.
4032
- UR_APIEXPORT ur_result_t UR_APICALL
4033
- urProgramBuildExp(
4034
- ur_context_handle_t hContext, ///< [in] handle of the context instance.
4035
- ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
4036
- uint32_t numDevices, ///< [in] number of devices
4037
- ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
4038
- const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4039
- );
4040
-
4041
4006
///////////////////////////////////////////////////////////////////////////////
4042
4007
/// @brief Produces an executable program from one or more programs.
4043
4008
///
@@ -8068,6 +8033,131 @@ urCommandBufferEnqueueExp(
8068
8033
///< command-buffer execution instance.
8069
8034
);
8070
8035
8036
+ #if !defined(__GNUC__)
8037
+ #pragma endregion
8038
+ #endif
8039
+ // Intel 'oneAPI' Unified Runtime Experimental APIs for multi-device compile
8040
+ #if !defined(__GNUC__)
8041
+ #pragma region multi device compile(experimental)
8042
+ #endif
8043
+ ///////////////////////////////////////////////////////////////////////////////
8044
+ #ifndef UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8045
+ /// @brief The extension string which defines support for test
8046
+ /// which is returned when querying device extensions.
8047
+ #define UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP "ur_exp_multi_device_compile"
8048
+ #endif // UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8049
+
8050
+ ///////////////////////////////////////////////////////////////////////////////
8051
+ /// @brief Produces an executable program from one program, negates need for the
8052
+ /// linking step.
8053
+ ///
8054
+ /// @details
8055
+ /// - The application may call this function from simultaneous threads.
8056
+ /// - Following a successful call to this entry point, the program passed
8057
+ /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
8058
+ /// for each device in `phDevices`.
8059
+ ///
8060
+ /// @remarks
8061
+ /// _Analogues_
8062
+ /// - **clBuildProgram**
8063
+ ///
8064
+ /// @returns
8065
+ /// - ::UR_RESULT_SUCCESS
8066
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8067
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8068
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8069
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8070
+ /// + `NULL == hProgram`
8071
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8072
+ /// + `NULL == phDevices`
8073
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8074
+ /// + If `hProgram` isn't a valid program object.
8075
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8076
+ /// + If an error occurred when building `hProgram`.
8077
+ UR_APIEXPORT ur_result_t UR_APICALL
8078
+ urProgramBuildExp(
8079
+ ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
8080
+ uint32_t numDevices, ///< [in] number of devices
8081
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8082
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8083
+ );
8084
+
8085
+ ///////////////////////////////////////////////////////////////////////////////
8086
+ /// @brief Produces an executable program from one or more programs.
8087
+ ///
8088
+ /// @details
8089
+ /// - The application may call this function from simultaneous threads.
8090
+ /// - Following a successful call to this entry point `hProgram` will
8091
+ /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type
8092
+ /// for each device in `phDevices`.
8093
+ ///
8094
+ /// @remarks
8095
+ /// _Analogues_
8096
+ /// - **clCompileProgram**
8097
+ ///
8098
+ /// @returns
8099
+ /// - ::UR_RESULT_SUCCESS
8100
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8101
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8102
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8103
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8104
+ /// + `NULL == hProgram`
8105
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8106
+ /// + `NULL == phDevices`
8107
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8108
+ /// + If `hProgram` isn't a valid program object.
8109
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8110
+ /// + If an error occurred while compiling `hProgram`.
8111
+ UR_APIEXPORT ur_result_t UR_APICALL
8112
+ urProgramCompileExp(
8113
+ ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile.
8114
+ uint32_t numDevices, ///< [in] number of devices
8115
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8116
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8117
+ );
8118
+
8119
+ ///////////////////////////////////////////////////////////////////////////////
8120
+ /// @brief Produces an executable program from one or more programs.
8121
+ ///
8122
+ /// @details
8123
+ /// - The application may call this function from simultaneous threads.
8124
+ /// - Following a successful call to this entry point the program returned
8125
+ /// in `phProgram` will contain a binary of the
8126
+ /// ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type for each device in
8127
+ /// `phDevices`.
8128
+ ///
8129
+ /// @remarks
8130
+ /// _Analogues_
8131
+ /// - **clLinkProgram**
8132
+ ///
8133
+ /// @returns
8134
+ /// - ::UR_RESULT_SUCCESS
8135
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8136
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8137
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8138
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8139
+ /// + `NULL == hContext`
8140
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8141
+ /// + `NULL == phDevices`
8142
+ /// + `NULL == phPrograms`
8143
+ /// + `NULL == phProgram`
8144
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8145
+ /// + If one of the programs in `phPrograms` isn't a valid program object.
8146
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8147
+ /// + `count == 0`
8148
+ /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE
8149
+ /// + If an error occurred while linking `phPrograms`.
8150
+ UR_APIEXPORT ur_result_t UR_APICALL
8151
+ urProgramLinkExp(
8152
+ ur_context_handle_t hContext, ///< [in] handle of the context instance.
8153
+ uint32_t numDevices, ///< [in] number of devices
8154
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8155
+ uint32_t count, ///< [in] number of program handles in `phPrograms`.
8156
+ const ur_program_handle_t *phPrograms, ///< [in][range(0, count)] pointer to array of program handles.
8157
+ const char *pOptions, ///< [in][optional] pointer to linker options null-terminated string.
8158
+ ur_program_handle_t *phProgram ///< [out] pointer to handle of program object created.
8159
+ );
8160
+
8071
8161
#if !defined(__GNUC__)
8072
8162
#pragma endregion
8073
8163
#endif
@@ -8574,7 +8664,6 @@ typedef struct ur_program_build_params_t {
8574
8664
/// @details Each entry is a pointer to the parameter passed to the function;
8575
8665
/// allowing the callback the ability to modify the parameter's value
8576
8666
typedef struct ur_program_build_exp_params_t {
8577
- ur_context_handle_t *phContext;
8578
8667
ur_program_handle_t *phProgram;
8579
8668
uint32_t *pnumDevices;
8580
8669
ur_device_handle_t **pphDevices;
@@ -8591,6 +8680,17 @@ typedef struct ur_program_compile_params_t {
8591
8680
const char **ppOptions;
8592
8681
} ur_program_compile_params_t;
8593
8682
8683
+ ///////////////////////////////////////////////////////////////////////////////
8684
+ /// @brief Function parameters for urProgramCompileExp
8685
+ /// @details Each entry is a pointer to the parameter passed to the function;
8686
+ /// allowing the callback the ability to modify the parameter's value
8687
+ typedef struct ur_program_compile_exp_params_t {
8688
+ ur_program_handle_t *phProgram;
8689
+ uint32_t *pnumDevices;
8690
+ ur_device_handle_t **pphDevices;
8691
+ const char **ppOptions;
8692
+ } ur_program_compile_exp_params_t;
8693
+
8594
8694
///////////////////////////////////////////////////////////////////////////////
8595
8695
/// @brief Function parameters for urProgramLink
8596
8696
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8603,6 +8703,20 @@ typedef struct ur_program_link_params_t {
8603
8703
ur_program_handle_t **pphProgram;
8604
8704
} ur_program_link_params_t;
8605
8705
8706
+ ///////////////////////////////////////////////////////////////////////////////
8707
+ /// @brief Function parameters for urProgramLinkExp
8708
+ /// @details Each entry is a pointer to the parameter passed to the function;
8709
+ /// allowing the callback the ability to modify the parameter's value
8710
+ typedef struct ur_program_link_exp_params_t {
8711
+ ur_context_handle_t *phContext;
8712
+ uint32_t *pnumDevices;
8713
+ ur_device_handle_t **pphDevices;
8714
+ uint32_t *pcount;
8715
+ const ur_program_handle_t **pphPrograms;
8716
+ const char **ppOptions;
8717
+ ur_program_handle_t **pphProgram;
8718
+ } ur_program_link_exp_params_t;
8719
+
8606
8720
///////////////////////////////////////////////////////////////////////////////
8607
8721
/// @brief Function parameters for urProgramRetain
8608
8722
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments