@@ -228,6 +228,7 @@ typedef enum ur_function_t {
228228 UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED = 229, ///< Enumerator for ::urLoaderConfigSetMockingEnabled
229229 UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP = 230, ///< Enumerator for ::urBindlessImagesReleaseExternalMemoryExp
230230 UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP = 231, ///< Enumerator for ::urBindlessImagesMapExternalLinearMemoryExp
231+ UR_FUNCTION_PROGRAM_CREATE_WITH_BINARY_EXP = 232, ///< Enumerator for ::urProgramCreateWithBinaryExp
231232 /// @cond
232233 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
233234 /// @endcond
@@ -9401,6 +9402,56 @@ urProgramLinkExp(
94019402 ur_program_handle_t *phProgram ///< [out] pointer to handle of program object created.
94029403);
94039404
9405+ ///////////////////////////////////////////////////////////////////////////////
9406+ /// @brief Create a program object from native binaries for the specified
9407+ /// devices.
9408+ ///
9409+ /// @details
9410+ /// - The application may call this function from simultaneous threads.
9411+ /// - Following a successful call to this entry point, `phProgram` will
9412+ /// contain binaries of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or
9413+ /// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for the specified devices in
9414+ /// `phDevices`.
9415+ /// - The devices specified by `phDevices` must be associated with the
9416+ /// context.
9417+ /// - The adapter may (but is not required to) perform validation of the
9418+ /// provided modules during this call.
9419+ ///
9420+ /// @remarks
9421+ /// _Analogues_
9422+ /// - **clCreateProgramWithBinary**
9423+ ///
9424+ /// @returns
9425+ /// - ::UR_RESULT_SUCCESS
9426+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
9427+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
9428+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
9429+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
9430+ /// + `NULL == hContext`
9431+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
9432+ /// + `NULL == phDevices`
9433+ /// + `NULL == pLengths`
9434+ /// + `NULL == ppBinaries`
9435+ /// + `NULL == phProgram`
9436+ /// + `NULL != pProperties && pProperties->count > 0 && NULL == pProperties->pMetadatas`
9437+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
9438+ /// + `NULL != pProperties && NULL != pProperties->pMetadatas && pProperties->count == 0`
9439+ /// - ::UR_RESULT_ERROR_INVALID_NATIVE_BINARY
9440+ /// + If any binary in `ppBinaries` isn't a valid binary for the corresponding device in `phDevices.`
9441+ UR_APIEXPORT ur_result_t UR_APICALL
9442+ urProgramCreateWithBinaryExp(
9443+ ur_context_handle_t hContext, ///< [in] handle of the context instance
9444+ uint32_t numDevices, ///< [in] number of devices
9445+ ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] a pointer to a list of device handles. The
9446+ ///< binaries are loaded for devices specified in this list.
9447+ size_t *pLengths, ///< [in][range(0, numDevices)] array of sizes of program binaries
9448+ ///< specified by `pBinaries` (in bytes).
9449+ const uint8_t **ppBinaries, ///< [in][range(0, numDevices)] pointer to program binaries to be loaded
9450+ ///< for devices specified by `phDevices`.
9451+ const ur_program_properties_t *pProperties, ///< [in][optional] pointer to program creation properties.
9452+ ur_program_handle_t *phProgram ///< [out] pointer to handle of Program object created.
9453+ );
9454+
94049455#if !defined(__GNUC__)
94059456#pragma endregion
94069457#endif
@@ -10069,6 +10120,20 @@ typedef struct ur_program_retain_params_t {
1006910120 ur_program_handle_t *phProgram;
1007010121} ur_program_retain_params_t;
1007110122
10123+ ///////////////////////////////////////////////////////////////////////////////
10124+ /// @brief Function parameters for urProgramCreateWithBinaryExp
10125+ /// @details Each entry is a pointer to the parameter passed to the function;
10126+ /// allowing the callback the ability to modify the parameter's value
10127+ typedef struct ur_program_create_with_binary_exp_params_t {
10128+ ur_context_handle_t *phContext;
10129+ uint32_t *pnumDevices;
10130+ ur_device_handle_t **pphDevices;
10131+ size_t **ppLengths;
10132+ const uint8_t ***pppBinaries;
10133+ const ur_program_properties_t **ppProperties;
10134+ ur_program_handle_t **pphProgram;
10135+ } ur_program_create_with_binary_exp_params_t;
10136+
1007210137///////////////////////////////////////////////////////////////////////////////
1007310138/// @brief Function parameters for urProgramRelease
1007410139/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments