@@ -206,6 +206,8 @@ typedef enum ur_function_t {
206
206
UR_FUNCTION_ADAPTER_GET_LAST_ERROR = 180, ///< Enumerator for ::urAdapterGetLastError
207
207
UR_FUNCTION_ADAPTER_GET_INFO = 181, ///< Enumerator for ::urAdapterGetInfo
208
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
@@ -3994,43 +3996,6 @@ urProgramBuild(
3994
3996
const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
3995
3997
);
3996
3998
3997
- ///////////////////////////////////////////////////////////////////////////////
3998
- /// @brief Produces an executable program from one program, negates need for the
3999
- /// linking step.
4000
- ///
4001
- /// @details
4002
- /// - The application may call this function from simultaneous threads.
4003
- /// - Following a successful call to this entry point, the program passed
4004
- /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
4005
- /// for each device in `hContext`.
4006
- ///
4007
- /// @remarks
4008
- /// _Analogues_
4009
- /// - **clBuildProgram**
4010
- ///
4011
- /// @returns
4012
- /// - ::UR_RESULT_SUCCESS
4013
- /// - ::UR_RESULT_ERROR_UNINITIALIZED
4014
- /// - ::UR_RESULT_ERROR_DEVICE_LOST
4015
- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4016
- /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4017
- /// + `NULL == hContext`
4018
- /// + `NULL == hProgram`
4019
- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4020
- /// + `NULL == phDevices`
4021
- /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
4022
- /// + If `hProgram` isn't a valid program object.
4023
- /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
4024
- /// + If an error occurred when building `hProgram`.
4025
- UR_APIEXPORT ur_result_t UR_APICALL
4026
- urProgramBuildExp(
4027
- ur_context_handle_t hContext, ///< [in] handle of the context instance.
4028
- ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
4029
- uint32_t numDevices, ///< [in] number of devices
4030
- ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
4031
- const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4032
- );
4033
-
4034
3999
///////////////////////////////////////////////////////////////////////////////
4035
4000
/// @brief Produces an executable program from one or more programs.
4036
4001
///
@@ -8063,6 +8028,131 @@ urCommandBufferEnqueueExp(
8063
8028
///< command-buffer execution instance.
8064
8029
);
8065
8030
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
+
8066
8156
#if !defined(__GNUC__)
8067
8157
#pragma endregion
8068
8158
#endif
@@ -8569,7 +8659,6 @@ typedef struct ur_program_build_params_t {
8569
8659
/// @details Each entry is a pointer to the parameter passed to the function;
8570
8660
/// allowing the callback the ability to modify the parameter's value
8571
8661
typedef struct ur_program_build_exp_params_t {
8572
- ur_context_handle_t *phContext;
8573
8662
ur_program_handle_t *phProgram;
8574
8663
uint32_t *pnumDevices;
8575
8664
ur_device_handle_t **pphDevices;
@@ -8586,6 +8675,17 @@ typedef struct ur_program_compile_params_t {
8586
8675
const char **ppOptions;
8587
8676
} ur_program_compile_params_t;
8588
8677
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
+
8589
8689
///////////////////////////////////////////////////////////////////////////////
8590
8690
/// @brief Function parameters for urProgramLink
8591
8691
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8598,6 +8698,20 @@ typedef struct ur_program_link_params_t {
8598
8698
ur_program_handle_t **pphProgram;
8599
8699
} ur_program_link_params_t;
8600
8700
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
+
8601
8715
///////////////////////////////////////////////////////////////////////////////
8602
8716
/// @brief Function parameters for urProgramRetain
8603
8717
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments