@@ -212,7 +212,9 @@ 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_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK = 198, ///< Enumerator for ::urLoaderConfigSetCodeLocationCallback
215
+ UR_FUNCTION_PROGRAM_COMPILE_EXP = 198, ///< Enumerator for ::urProgramCompileExp
216
+ UR_FUNCTION_PROGRAM_LINK_EXP = 199, ///< Enumerator for ::urProgramLinkExp
217
+ UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK = 200, ///< Enumerator for ::urLoaderConfigSetCodeLocationCallback
216
218
/// @cond
217
219
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
218
220
/// @endcond
@@ -4076,43 +4078,6 @@ urProgramBuild(
4076
4078
const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4077
4079
);
4078
4080
4079
- ///////////////////////////////////////////////////////////////////////////////
4080
- /// @brief Produces an executable program from one program, negates need for the
4081
- /// linking step.
4082
- ///
4083
- /// @details
4084
- /// - The application may call this function from simultaneous threads.
4085
- /// - Following a successful call to this entry point, the program passed
4086
- /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
4087
- /// for each device in `hContext`.
4088
- ///
4089
- /// @remarks
4090
- /// _Analogues_
4091
- /// - **clBuildProgram**
4092
- ///
4093
- /// @returns
4094
- /// - ::UR_RESULT_SUCCESS
4095
- /// - ::UR_RESULT_ERROR_UNINITIALIZED
4096
- /// - ::UR_RESULT_ERROR_DEVICE_LOST
4097
- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4098
- /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4099
- /// + `NULL == hContext`
4100
- /// + `NULL == hProgram`
4101
- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4102
- /// + `NULL == phDevices`
4103
- /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
4104
- /// + If `hProgram` isn't a valid program object.
4105
- /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
4106
- /// + If an error occurred when building `hProgram`.
4107
- UR_APIEXPORT ur_result_t UR_APICALL
4108
- urProgramBuildExp(
4109
- ur_context_handle_t hContext, ///< [in] handle of the context instance.
4110
- ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
4111
- uint32_t numDevices, ///< [in] number of devices
4112
- ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
4113
- const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
4114
- );
4115
-
4116
4081
///////////////////////////////////////////////////////////////////////////////
4117
4082
/// @brief Produces an executable program from one or more programs.
4118
4083
///
@@ -8446,6 +8411,131 @@ urKernelSuggestMaxCooperativeGroupCountExp(
8446
8411
uint32_t *pGroupCountRet ///< [out] pointer to maximum number of groups
8447
8412
);
8448
8413
8414
+ #if !defined(__GNUC__)
8415
+ #pragma endregion
8416
+ #endif
8417
+ // Intel 'oneAPI' Unified Runtime Experimental APIs for multi-device compile
8418
+ #if !defined(__GNUC__)
8419
+ #pragma region multi device compile(experimental)
8420
+ #endif
8421
+ ///////////////////////////////////////////////////////////////////////////////
8422
+ #ifndef UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8423
+ /// @brief The extension string which defines support for test
8424
+ /// which is returned when querying device extensions.
8425
+ #define UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP "ur_exp_multi_device_compile"
8426
+ #endif // UR_MULTI_DEVICE_COMPILE_EXTENSION_STRING_EXP
8427
+
8428
+ ///////////////////////////////////////////////////////////////////////////////
8429
+ /// @brief Produces an executable program from one program, negates need for the
8430
+ /// linking step.
8431
+ ///
8432
+ /// @details
8433
+ /// - The application may call this function from simultaneous threads.
8434
+ /// - Following a successful call to this entry point, the program passed
8435
+ /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type
8436
+ /// for each device in `phDevices`.
8437
+ ///
8438
+ /// @remarks
8439
+ /// _Analogues_
8440
+ /// - **clBuildProgram**
8441
+ ///
8442
+ /// @returns
8443
+ /// - ::UR_RESULT_SUCCESS
8444
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8445
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8446
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8447
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8448
+ /// + `NULL == hProgram`
8449
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8450
+ /// + `NULL == phDevices`
8451
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8452
+ /// + If `hProgram` isn't a valid program object.
8453
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8454
+ /// + If an error occurred when building `hProgram`.
8455
+ UR_APIEXPORT ur_result_t UR_APICALL
8456
+ urProgramBuildExp(
8457
+ ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
8458
+ uint32_t numDevices, ///< [in] number of devices
8459
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8460
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8461
+ );
8462
+
8463
+ ///////////////////////////////////////////////////////////////////////////////
8464
+ /// @brief Produces an executable program from one or more programs.
8465
+ ///
8466
+ /// @details
8467
+ /// - The application may call this function from simultaneous threads.
8468
+ /// - Following a successful call to this entry point `hProgram` will
8469
+ /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type
8470
+ /// for each device in `phDevices`.
8471
+ ///
8472
+ /// @remarks
8473
+ /// _Analogues_
8474
+ /// - **clCompileProgram**
8475
+ ///
8476
+ /// @returns
8477
+ /// - ::UR_RESULT_SUCCESS
8478
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8479
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8480
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8481
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8482
+ /// + `NULL == hProgram`
8483
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8484
+ /// + `NULL == phDevices`
8485
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8486
+ /// + If `hProgram` isn't a valid program object.
8487
+ /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE
8488
+ /// + If an error occurred while compiling `hProgram`.
8489
+ UR_APIEXPORT ur_result_t UR_APICALL
8490
+ urProgramCompileExp(
8491
+ ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile.
8492
+ uint32_t numDevices, ///< [in] number of devices
8493
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8494
+ const char *pOptions ///< [in][optional] pointer to build options null-terminated string.
8495
+ );
8496
+
8497
+ ///////////////////////////////////////////////////////////////////////////////
8498
+ /// @brief Produces an executable program from one or more programs.
8499
+ ///
8500
+ /// @details
8501
+ /// - The application may call this function from simultaneous threads.
8502
+ /// - Following a successful call to this entry point the program returned
8503
+ /// in `phProgram` will contain a binary of the
8504
+ /// ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type for each device in
8505
+ /// `phDevices`.
8506
+ ///
8507
+ /// @remarks
8508
+ /// _Analogues_
8509
+ /// - **clLinkProgram**
8510
+ ///
8511
+ /// @returns
8512
+ /// - ::UR_RESULT_SUCCESS
8513
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8514
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8515
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8516
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8517
+ /// + `NULL == hContext`
8518
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8519
+ /// + `NULL == phDevices`
8520
+ /// + `NULL == phPrograms`
8521
+ /// + `NULL == phProgram`
8522
+ /// - ::UR_RESULT_ERROR_INVALID_PROGRAM
8523
+ /// + If one of the programs in `phPrograms` isn't a valid program object.
8524
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8525
+ /// + `count == 0`
8526
+ /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE
8527
+ /// + If an error occurred while linking `phPrograms`.
8528
+ UR_APIEXPORT ur_result_t UR_APICALL
8529
+ urProgramLinkExp(
8530
+ ur_context_handle_t hContext, ///< [in] handle of the context instance.
8531
+ uint32_t numDevices, ///< [in] number of devices
8532
+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles
8533
+ uint32_t count, ///< [in] number of program handles in `phPrograms`.
8534
+ const ur_program_handle_t *phPrograms, ///< [in][range(0, count)] pointer to array of program handles.
8535
+ const char *pOptions, ///< [in][optional] pointer to linker options null-terminated string.
8536
+ ur_program_handle_t *phProgram ///< [out] pointer to handle of program object created.
8537
+ );
8538
+
8449
8539
#if !defined(__GNUC__)
8450
8540
#pragma endregion
8451
8541
#endif
@@ -8962,7 +9052,6 @@ typedef struct ur_program_build_params_t {
8962
9052
/// @details Each entry is a pointer to the parameter passed to the function;
8963
9053
/// allowing the callback the ability to modify the parameter's value
8964
9054
typedef struct ur_program_build_exp_params_t {
8965
- ur_context_handle_t *phContext;
8966
9055
ur_program_handle_t *phProgram;
8967
9056
uint32_t *pnumDevices;
8968
9057
ur_device_handle_t **pphDevices;
@@ -8979,6 +9068,17 @@ typedef struct ur_program_compile_params_t {
8979
9068
const char **ppOptions;
8980
9069
} ur_program_compile_params_t;
8981
9070
9071
+ ///////////////////////////////////////////////////////////////////////////////
9072
+ /// @brief Function parameters for urProgramCompileExp
9073
+ /// @details Each entry is a pointer to the parameter passed to the function;
9074
+ /// allowing the callback the ability to modify the parameter's value
9075
+ typedef struct ur_program_compile_exp_params_t {
9076
+ ur_program_handle_t *phProgram;
9077
+ uint32_t *pnumDevices;
9078
+ ur_device_handle_t **pphDevices;
9079
+ const char **ppOptions;
9080
+ } ur_program_compile_exp_params_t;
9081
+
8982
9082
///////////////////////////////////////////////////////////////////////////////
8983
9083
/// @brief Function parameters for urProgramLink
8984
9084
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8991,6 +9091,20 @@ typedef struct ur_program_link_params_t {
8991
9091
ur_program_handle_t **pphProgram;
8992
9092
} ur_program_link_params_t;
8993
9093
9094
+ ///////////////////////////////////////////////////////////////////////////////
9095
+ /// @brief Function parameters for urProgramLinkExp
9096
+ /// @details Each entry is a pointer to the parameter passed to the function;
9097
+ /// allowing the callback the ability to modify the parameter's value
9098
+ typedef struct ur_program_link_exp_params_t {
9099
+ ur_context_handle_t *phContext;
9100
+ uint32_t *pnumDevices;
9101
+ ur_device_handle_t **pphDevices;
9102
+ uint32_t *pcount;
9103
+ const ur_program_handle_t **pphPrograms;
9104
+ const char **ppOptions;
9105
+ ur_program_handle_t **pphProgram;
9106
+ } ur_program_link_exp_params_t;
9107
+
8994
9108
///////////////////////////////////////////////////////////////////////////////
8995
9109
/// @brief Function parameters for urProgramRetain
8996
9110
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments