7
7
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8
8
*
9
9
* @file ur_api.h
10
- * @version v0.7 -r0
10
+ * @version v0.9 -r0
11
11
*
12
12
*/
13
13
#ifndef UR_API_H_INCLUDED
@@ -205,6 +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 = 197, ///< Enumerator for ::urProgramBuildExp
209
+ UR_FUNCTION_PROGRAM_COMPILE_EXP = 198, ///< Enumerator for ::urProgramCompileExp
210
+ UR_FUNCTION_PROGRAM_LINK_EXP = 199, ///< Enumerator for ::urProgramLinkExp
208
211
/// @cond
209
212
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
210
213
/// @endcond
@@ -1022,7 +1025,9 @@ urPlatformGetInfo(
1022
1025
typedef enum ur_api_version_t {
1023
1026
UR_API_VERSION_0_6 = UR_MAKE_VERSION(0, 6), ///< version 0.6
1024
1027
UR_API_VERSION_0_7 = UR_MAKE_VERSION(0, 7), ///< version 0.7
1025
- UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 7), ///< latest known version
1028
+ UR_API_VERSION_0_8 = UR_MAKE_VERSION(0, 8), ///< version 0.8
1029
+ UR_API_VERSION_0_9 = UR_MAKE_VERSION(0, 9), ///< version 0.9
1030
+ UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 9), ///< latest known version
1026
1031
/// @cond
1027
1032
UR_API_VERSION_FORCE_UINT32 = 0x7fffffff
1028
1033
/// @endcond
@@ -8030,6 +8035,131 @@ urCommandBufferEnqueueExp(
8030
8035
///< command-buffer execution instance.
8031
8036
);
8032
8037
8038
+ #if !defined(__GNUC__)
8039
+ #pragma endregion
8040
+ #endif
8041
+ // Intel 'oneAPI' Unified Runtime Experimental APIs for multi-device compile
8042
+ #if !defined(__GNUC__)
8043
+ #pragma region multi device compile(experimental)
8044
+ #endif
8045
+ ///////////////////////////////////////////////////////////////////////////////
8046
+ #ifndef UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8047
+ /// @brief The extension string which defines support for test
8048
+ /// which is returned when querying device extensions.
8049
+ #define UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP "ur_exp_multi_device_compile"
8050
+ #endif // UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8051
+
8052
+ ///////////////////////////////////////////////////////////////////////////////
8053
+ /// @brief Produces an executable program from one program, negates need for the
8054
+ /// linking step.
8055
+ ///
8056
+ /// @details
8057
+ /// - The application may call this function from simultaneous threads.
8058
+ /// - Following a successful call to this entry point, the program passed
8059
+ /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
8060
+ /// for each device in `phDevices`.
8061
+ ///
8062
+ /// @remarks
8063
+ /// _Analogues_
8064
+ /// - **clBuildProgram**
8065
+ ///
8066
+ /// @returns
8067
+ /// - ::UR_RESULT_SUCCESS
8068
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8069
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8070
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8071
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8072
+ /// + `NULL == hProgram`
8073
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8074
+ /// + `NULL == phDevices`
8075
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8076
+ /// + If `hProgram` isn't a valid program object.
8077
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8078
+ /// + If an error occurred when building `hProgram`.
8079
+ UR_APIEXPORT ur_result_t UR_APICALL
8080
+ urProgramBuildExp(
8081
+ ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
8082
+ uint32_t numDevices, ///< [in] number of devices
8083
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8084
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8085
+ );
8086
+
8087
+ ///////////////////////////////////////////////////////////////////////////////
8088
+ /// @brief Produces an executable program from one or more programs.
8089
+ ///
8090
+ /// @details
8091
+ /// - The application may call this function from simultaneous threads.
8092
+ /// - Following a successful call to this entry point `hProgram` will
8093
+ /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type
8094
+ /// for each device in `phDevices`.
8095
+ ///
8096
+ /// @remarks
8097
+ /// _Analogues_
8098
+ /// - **clCompileProgram**
8099
+ ///
8100
+ /// @returns
8101
+ /// - ::UR_RESULT_SUCCESS
8102
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8103
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8104
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8105
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8106
+ /// + `NULL == hProgram`
8107
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8108
+ /// + `NULL == phDevices`
8109
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8110
+ /// + If `hProgram` isn't a valid program object.
8111
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8112
+ /// + If an error occurred while compiling `hProgram`.
8113
+ UR_APIEXPORT ur_result_t UR_APICALL
8114
+ urProgramCompileExp(
8115
+ ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile.
8116
+ uint32_t numDevices, ///< [in] number of devices
8117
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8118
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8119
+ );
8120
+
8121
+ ///////////////////////////////////////////////////////////////////////////////
8122
+ /// @brief Produces an executable program from one or more programs.
8123
+ ///
8124
+ /// @details
8125
+ /// - The application may call this function from simultaneous threads.
8126
+ /// - Following a successful call to this entry point the program returned
8127
+ /// in `phProgram` will contain a binary of the
8128
+ /// ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type for each device in
8129
+ /// `phDevices`.
8130
+ ///
8131
+ /// @remarks
8132
+ /// _Analogues_
8133
+ /// - **clLinkProgram**
8134
+ ///
8135
+ /// @returns
8136
+ /// - ::UR_RESULT_SUCCESS
8137
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8138
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8139
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8140
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8141
+ /// + `NULL == hContext`
8142
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8143
+ /// + `NULL == phDevices`
8144
+ /// + `NULL == phPrograms`
8145
+ /// + `NULL == phProgram`
8146
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8147
+ /// + If one of the programs in `phPrograms` isn't a valid program object.
8148
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8149
+ /// + `count == 0`
8150
+ /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE
8151
+ /// + If an error occurred while linking `phPrograms`.
8152
+ UR_APIEXPORT ur_result_t UR_APICALL
8153
+ urProgramLinkExp(
8154
+ ur_context_handle_t hContext, ///< [in] handle of the context instance.
8155
+ uint32_t numDevices, ///< [in] number of devices
8156
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8157
+ uint32_t count, ///< [in] number of program handles in `phPrograms`.
8158
+ const ur_program_handle_t *phPrograms, ///< [in][range(0, count)] pointer to array of program handles.
8159
+ const char *pOptions, ///< [in][optional] pointer to linker options null-terminated string.
8160
+ ur_program_handle_t *phProgram ///< [out] pointer to handle of program object created.
8161
+ );
8162
+
8033
8163
#if !defined(__GNUC__)
8034
8164
#pragma endregion
8035
8165
#endif
@@ -8531,6 +8661,17 @@ typedef struct ur_program_build_params_t {
8531
8661
const char **ppOptions;
8532
8662
} ur_program_build_params_t;
8533
8663
8664
+ ///////////////////////////////////////////////////////////////////////////////
8665
+ /// @brief Function parameters for urProgramBuildExp
8666
+ /// @details Each entry is a pointer to the parameter passed to the function;
8667
+ /// allowing the callback the ability to modify the parameter's value
8668
+ typedef struct ur_program_build_exp_params_t {
8669
+ ur_program_handle_t *phProgram;
8670
+ uint32_t *pnumDevices;
8671
+ ur_device_handle_t **pphDevices;
8672
+ const char **ppOptions;
8673
+ } ur_program_build_exp_params_t;
8674
+
8534
8675
///////////////////////////////////////////////////////////////////////////////
8535
8676
/// @brief Function parameters for urProgramCompile
8536
8677
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8541,6 +8682,17 @@ typedef struct ur_program_compile_params_t {
8541
8682
const char **ppOptions;
8542
8683
} ur_program_compile_params_t;
8543
8684
8685
+ ///////////////////////////////////////////////////////////////////////////////
8686
+ /// @brief Function parameters for urProgramCompileExp
8687
+ /// @details Each entry is a pointer to the parameter passed to the function;
8688
+ /// allowing the callback the ability to modify the parameter's value
8689
+ typedef struct ur_program_compile_exp_params_t {
8690
+ ur_program_handle_t *phProgram;
8691
+ uint32_t *pnumDevices;
8692
+ ur_device_handle_t **pphDevices;
8693
+ const char **ppOptions;
8694
+ } ur_program_compile_exp_params_t;
8695
+
8544
8696
///////////////////////////////////////////////////////////////////////////////
8545
8697
/// @brief Function parameters for urProgramLink
8546
8698
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8553,6 +8705,20 @@ typedef struct ur_program_link_params_t {
8553
8705
ur_program_handle_t **pphProgram;
8554
8706
} ur_program_link_params_t;
8555
8707
8708
+ ///////////////////////////////////////////////////////////////////////////////
8709
+ /// @brief Function parameters for urProgramLinkExp
8710
+ /// @details Each entry is a pointer to the parameter passed to the function;
8711
+ /// allowing the callback the ability to modify the parameter's value
8712
+ typedef struct ur_program_link_exp_params_t {
8713
+ ur_context_handle_t *phContext;
8714
+ uint32_t *pnumDevices;
8715
+ ur_device_handle_t **pphDevices;
8716
+ uint32_t *pcount;
8717
+ const ur_program_handle_t **pphPrograms;
8718
+ const char **ppOptions;
8719
+ ur_program_handle_t **pphProgram;
8720
+ } ur_program_link_exp_params_t;
8721
+
8556
8722
///////////////////////////////////////////////////////////////////////////////
8557
8723
/// @brief Function parameters for urProgramRetain
8558
8724
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments