@@ -212,6 +212,8 @@ typedef enum ur_function_t {
212
212
UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP = 195, ///< Enumerator for ::urCommandBufferAppendUSMPrefetchExp
213
213
UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP = 196, ///< Enumerator for ::urCommandBufferAppendUSMAdviseExp
214
214
UR_FUNCTION_PROGRAM_BUILD_EXP = 197, ///< Enumerator for ::urProgramBuildExp
215
+ UR_FUNCTION_PROGRAM_COMPILE_EXP = 198, ///< Enumerator for ::urProgramCompileExp
216
+ UR_FUNCTION_PROGRAM_LINK_EXP = 199, ///< Enumerator for ::urProgramLinkExp
215
217
/// @cond
216
218
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
217
219
/// @endcond
@@ -4032,43 +4034,6 @@ urProgramBuild(
4032
4034
const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4033
4035
);
4034
4036
4035
- ///////////////////////////////////////////////////////////////////////////////
4036
- /// @brief Produces an executable program from one program, negates need for the
4037
- /// linking step.
4038
- ///
4039
- /// @details
4040
- /// - The application may call this function from simultaneous threads.
4041
- /// - Following a successful call to this entry point, the program passed
4042
- /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
4043
- /// for each device in `hContext`.
4044
- ///
4045
- /// @remarks
4046
- /// _Analogues_
4047
- /// - **clBuildProgram**
4048
- ///
4049
- /// @returns
4050
- /// - ::UR_RESULT_SUCCESS
4051
- /// - ::UR_RESULT_ERROR_UNINITIALIZED
4052
- /// - ::UR_RESULT_ERROR_DEVICE_LOST
4053
- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4054
- /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4055
- /// + `NULL == hContext`
4056
- /// + `NULL == hProgram`
4057
- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4058
- /// + `NULL == phDevices`
4059
- /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
4060
- /// + If `hProgram` isn't a valid program object.
4061
- /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
4062
- /// + If an error occurred when building `hProgram`.
4063
- UR_APIEXPORT ur_result_t UR_APICALL
4064
- urProgramBuildExp(
4065
- ur_context_handle_t hContext, ///< [in] handle of the context instance.
4066
- ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
4067
- uint32_t numDevices, ///< [in] number of devices
4068
- ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
4069
- const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4070
- );
4071
-
4072
4037
///////////////////////////////////////////////////////////////////////////////
4073
4038
/// @brief Produces an executable program from one or more programs.
4074
4039
///
@@ -8402,6 +8367,131 @@ urKernelSuggestMaxCooperativeGroupCountExp(
8402
8367
uint32_t *pGroupCountRet ///< [out] pointer to maximum number of groups
8403
8368
);
8404
8369
8370
+ #if !defined(__GNUC__)
8371
+ #pragma endregion
8372
+ #endif
8373
+ // Intel 'oneAPI' Unified Runtime Experimental APIs for multi-device compile
8374
+ #if !defined(__GNUC__)
8375
+ #pragma region multi device compile(experimental)
8376
+ #endif
8377
+ ///////////////////////////////////////////////////////////////////////////////
8378
+ #ifndef UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8379
+ /// @brief The extension string which defines support for test
8380
+ /// which is returned when querying device extensions.
8381
+ #define UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP "ur_exp_multi_device_compile"
8382
+ #endif // UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8383
+
8384
+ ///////////////////////////////////////////////////////////////////////////////
8385
+ /// @brief Produces an executable program from one program, negates need for the
8386
+ /// linking step.
8387
+ ///
8388
+ /// @details
8389
+ /// - The application may call this function from simultaneous threads.
8390
+ /// - Following a successful call to this entry point, the program passed
8391
+ /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
8392
+ /// for each device in `phDevices`.
8393
+ ///
8394
+ /// @remarks
8395
+ /// _Analogues_
8396
+ /// - **clBuildProgram**
8397
+ ///
8398
+ /// @returns
8399
+ /// - ::UR_RESULT_SUCCESS
8400
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8401
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8402
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8403
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8404
+ /// + `NULL == hProgram`
8405
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8406
+ /// + `NULL == phDevices`
8407
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8408
+ /// + If `hProgram` isn't a valid program object.
8409
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8410
+ /// + If an error occurred when building `hProgram`.
8411
+ UR_APIEXPORT ur_result_t UR_APICALL
8412
+ urProgramBuildExp(
8413
+ ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
8414
+ uint32_t numDevices, ///< [in] number of devices
8415
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8416
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8417
+ );
8418
+
8419
+ ///////////////////////////////////////////////////////////////////////////////
8420
+ /// @brief Produces an executable program from one or more programs.
8421
+ ///
8422
+ /// @details
8423
+ /// - The application may call this function from simultaneous threads.
8424
+ /// - Following a successful call to this entry point `hProgram` will
8425
+ /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type
8426
+ /// for each device in `phDevices`.
8427
+ ///
8428
+ /// @remarks
8429
+ /// _Analogues_
8430
+ /// - **clCompileProgram**
8431
+ ///
8432
+ /// @returns
8433
+ /// - ::UR_RESULT_SUCCESS
8434
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8435
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8436
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8437
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8438
+ /// + `NULL == hProgram`
8439
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8440
+ /// + `NULL == phDevices`
8441
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8442
+ /// + If `hProgram` isn't a valid program object.
8443
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8444
+ /// + If an error occurred while compiling `hProgram`.
8445
+ UR_APIEXPORT ur_result_t UR_APICALL
8446
+ urProgramCompileExp(
8447
+ ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile.
8448
+ uint32_t numDevices, ///< [in] number of devices
8449
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8450
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8451
+ );
8452
+
8453
+ ///////////////////////////////////////////////////////////////////////////////
8454
+ /// @brief Produces an executable program from one or more programs.
8455
+ ///
8456
+ /// @details
8457
+ /// - The application may call this function from simultaneous threads.
8458
+ /// - Following a successful call to this entry point the program returned
8459
+ /// in `phProgram` will contain a binary of the
8460
+ /// ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type for each device in
8461
+ /// `phDevices`.
8462
+ ///
8463
+ /// @remarks
8464
+ /// _Analogues_
8465
+ /// - **clLinkProgram**
8466
+ ///
8467
+ /// @returns
8468
+ /// - ::UR_RESULT_SUCCESS
8469
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8470
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8471
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8472
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8473
+ /// + `NULL == hContext`
8474
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8475
+ /// + `NULL == phDevices`
8476
+ /// + `NULL == phPrograms`
8477
+ /// + `NULL == phProgram`
8478
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8479
+ /// + If one of the programs in `phPrograms` isn't a valid program object.
8480
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8481
+ /// + `count == 0`
8482
+ /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE
8483
+ /// + If an error occurred while linking `phPrograms`.
8484
+ UR_APIEXPORT ur_result_t UR_APICALL
8485
+ urProgramLinkExp(
8486
+ ur_context_handle_t hContext, ///< [in] handle of the context instance.
8487
+ uint32_t numDevices, ///< [in] number of devices
8488
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8489
+ uint32_t count, ///< [in] number of program handles in `phPrograms`.
8490
+ const ur_program_handle_t *phPrograms, ///< [in][range(0, count)] pointer to array of program handles.
8491
+ const char *pOptions, ///< [in][optional] pointer to linker options null-terminated string.
8492
+ ur_program_handle_t *phProgram ///< [out] pointer to handle of program object created.
8493
+ );
8494
+
8405
8495
#if !defined(__GNUC__)
8406
8496
#pragma endregion
8407
8497
#endif
@@ -8908,7 +8998,6 @@ typedef struct ur_program_build_params_t {
8908
8998
/// @details Each entry is a pointer to the parameter passed to the function;
8909
8999
/// allowing the callback the ability to modify the parameter's value
8910
9000
typedef struct ur_program_build_exp_params_t {
8911
- ur_context_handle_t *phContext;
8912
9001
ur_program_handle_t *phProgram;
8913
9002
uint32_t *pnumDevices;
8914
9003
ur_device_handle_t **pphDevices;
@@ -8925,6 +9014,17 @@ typedef struct ur_program_compile_params_t {
8925
9014
const char **ppOptions;
8926
9015
} ur_program_compile_params_t;
8927
9016
9017
+ ///////////////////////////////////////////////////////////////////////////////
9018
+ /// @brief Function parameters for urProgramCompileExp
9019
+ /// @details Each entry is a pointer to the parameter passed to the function;
9020
+ /// allowing the callback the ability to modify the parameter's value
9021
+ typedef struct ur_program_compile_exp_params_t {
9022
+ ur_program_handle_t *phProgram;
9023
+ uint32_t *pnumDevices;
9024
+ ur_device_handle_t **pphDevices;
9025
+ const char **ppOptions;
9026
+ } ur_program_compile_exp_params_t;
9027
+
8928
9028
///////////////////////////////////////////////////////////////////////////////
8929
9029
/// @brief Function parameters for urProgramLink
8930
9030
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8937,6 +9037,20 @@ typedef struct ur_program_link_params_t {
8937
9037
ur_program_handle_t **pphProgram;
8938
9038
} ur_program_link_params_t;
8939
9039
9040
+ ///////////////////////////////////////////////////////////////////////////////
9041
+ /// @brief Function parameters for urProgramLinkExp
9042
+ /// @details Each entry is a pointer to the parameter passed to the function;
9043
+ /// allowing the callback the ability to modify the parameter's value
9044
+ typedef struct ur_program_link_exp_params_t {
9045
+ ur_context_handle_t *phContext;
9046
+ uint32_t *pnumDevices;
9047
+ ur_device_handle_t **pphDevices;
9048
+ uint32_t *pcount;
9049
+ const ur_program_handle_t **pphPrograms;
9050
+ const char **ppOptions;
9051
+ ur_program_handle_t **pphProgram;
9052
+ } ur_program_link_exp_params_t;
9053
+
8940
9054
///////////////////////////////////////////////////////////////////////////////
8941
9055
/// @brief Function parameters for urProgramRetain
8942
9056
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments