@@ -211,7 +211,10 @@ typedef enum ur_function_t {
211
211
UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP = 194, ///< Enumerator for ::urKernelSuggestMaxCooperativeGroupCountExp
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
- UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK = 197, ///< Enumerator for ::urLoaderConfigSetCodeLocationCallback
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
217
+ UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK = 200, ///< Enumerator for ::urLoaderConfigSetCodeLocationCallback
215
218
/// @cond
216
219
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
217
220
/// @endcond
@@ -8408,6 +8411,131 @@ urKernelSuggestMaxCooperativeGroupCountExp(
8408
8411
uint32_t *pGroupCountRet ///< [out] pointer to maximum number of groups
8409
8412
);
8410
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
+
8411
8539
#if !defined(__GNUC__)
8412
8540
#pragma endregion
8413
8541
#endif
@@ -8919,6 +9047,17 @@ typedef struct ur_program_build_params_t {
8919
9047
const char **ppOptions;
8920
9048
} ur_program_build_params_t;
8921
9049
9050
+ ///////////////////////////////////////////////////////////////////////////////
9051
+ /// @brief Function parameters for urProgramBuildExp
9052
+ /// @details Each entry is a pointer to the parameter passed to the function;
9053
+ /// allowing the callback the ability to modify the parameter's value
9054
+ typedef struct ur_program_build_exp_params_t {
9055
+ ur_program_handle_t *phProgram;
9056
+ uint32_t *pnumDevices;
9057
+ ur_device_handle_t **pphDevices;
9058
+ const char **ppOptions;
9059
+ } ur_program_build_exp_params_t;
9060
+
8922
9061
///////////////////////////////////////////////////////////////////////////////
8923
9062
/// @brief Function parameters for urProgramCompile
8924
9063
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8929,6 +9068,17 @@ typedef struct ur_program_compile_params_t {
8929
9068
const char **ppOptions;
8930
9069
} ur_program_compile_params_t;
8931
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
+
8932
9082
///////////////////////////////////////////////////////////////////////////////
8933
9083
/// @brief Function parameters for urProgramLink
8934
9084
/// @details Each entry is a pointer to the parameter passed to the function;
@@ -8941,6 +9091,20 @@ typedef struct ur_program_link_params_t {
8941
9091
ur_program_handle_t **pphProgram;
8942
9092
} ur_program_link_params_t;
8943
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
+
8944
9108
///////////////////////////////////////////////////////////////////////////////
8945
9109
/// @brief Function parameters for urProgramRetain
8946
9110
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments