@@ -4201,17 +4201,19 @@ urProgramCreateWithIL(
42014201);
42024202
42034203///////////////////////////////////////////////////////////////////////////////
4204- /// @brief Create a program object from device native binary.
4204+ /// @brief Create a program object from native binaries for the specified
4205+ /// devices.
42054206///
42064207/// @details
42074208/// - The application may call this function from simultaneous threads.
42084209/// - Following a successful call to this entry point, `phProgram` will
4209- /// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or
4210- /// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for `hDevice`.
4211- /// - The device specified by `hDevice` must be device associated with
4210+ /// contain binaries of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or
4211+ /// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for the specified devices in
4212+ /// `phDevices`.
4213+ /// - The devices specified by `phDevices` must be associated with the
42124214/// context.
42134215/// - The adapter may (but is not required to) perform validation of the
4214- /// provided module during this call.
4216+ /// provided modules during this call.
42154217///
42164218/// @remarks
42174219/// _Analogues_
@@ -4224,21 +4226,26 @@ urProgramCreateWithIL(
42244226/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
42254227/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
42264228/// + `NULL == hContext`
4227- /// + `NULL == hDevice`
42284229/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4229- /// + `NULL == pBinary`
4230+ /// + `NULL == phDevices`
4231+ /// + `NULL == pLengths`
4232+ /// + `NULL == ppBinaries`
42304233/// + `NULL == phProgram`
42314234/// + `NULL != pProperties && pProperties->count > 0 && NULL == pProperties->pMetadatas`
42324235/// - ::UR_RESULT_ERROR_INVALID_SIZE
42334236/// + `NULL != pProperties && NULL != pProperties->pMetadatas && pProperties->count == 0`
42344237/// - ::UR_RESULT_ERROR_INVALID_NATIVE_BINARY
4235- /// + If `pBinary ` isn't a valid binary for `hDevice .`
4238+ /// + If any binary in `ppBinaries ` isn't a valid binary for the corresponding device in `phDevices .`
42364239UR_APIEXPORT ur_result_t UR_APICALL
42374240urProgramCreateWithBinary(
42384241 ur_context_handle_t hContext, ///< [in] handle of the context instance
4239- ur_device_handle_t hDevice, ///< [in] handle to device associated with binary.
4240- size_t size, ///< [in] size in bytes.
4241- const uint8_t *pBinary, ///< [in] pointer to binary.
4242+ uint32_t numDevices, ///< [in] number of devices
4243+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] a pointer to a list of device handles. The
4244+ ///< binaries are loaded for devices specified in this list.
4245+ size_t *pLengths, ///< [in][range(0, numDevices)] array of sizes of program binaries
4246+ ///< specified by `pBinaries` (in bytes).
4247+ const uint8_t **ppBinaries, ///< [in][range(0, numDevices)] pointer to program binaries to be loaded
4248+ ///< for devices specified by `phDevices`.
42424249 const ur_program_properties_t *pProperties, ///< [in][optional] pointer to program creation properties.
42434250 ur_program_handle_t *phProgram ///< [out] pointer to handle of Program object created.
42444251);
@@ -10035,9 +10042,10 @@ typedef struct ur_program_create_with_il_params_t {
1003510042/// allowing the callback the ability to modify the parameter's value
1003610043typedef struct ur_program_create_with_binary_params_t {
1003710044 ur_context_handle_t *phContext;
10038- ur_device_handle_t *phDevice;
10039- size_t *psize;
10040- const uint8_t **ppBinary;
10045+ uint32_t *pnumDevices;
10046+ ur_device_handle_t **pphDevices;
10047+ size_t **ppLengths;
10048+ const uint8_t ***pppBinaries;
1004110049 const ur_program_properties_t **ppProperties;
1004210050 ur_program_handle_t **pphProgram;
1004310051} ur_program_create_with_binary_params_t;
0 commit comments