@@ -2401,16 +2401,19 @@ typedef struct ur_context_native_properties_t {
24012401/// - ::UR_RESULT_ERROR_UNINITIALIZED
24022402/// - ::UR_RESULT_ERROR_DEVICE_LOST
24032403/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
2404+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
2405+ /// + `NULL == hAdapter`
24042406/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
2405- /// + `NULL == phDevices`
24062407/// + `NULL == phContext`
24072408/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
24082409/// + If the adapter has no underlying equivalent handle.
24092410UR_APIEXPORT ur_result_t UR_APICALL
24102411urContextCreateWithNativeHandle(
24112412 ur_native_handle_t hNativeContext, ///< [in][nocheck] the native handle of the context.
2413+ ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter that owns the native handle
24122414 uint32_t numDevices, ///< [in] number of devices associated with the context
2413- const ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] list of devices associated with the context
2415+ const ur_device_handle_t *phDevices, ///< [in][optional][range(0, numDevices)] list of devices associated with
2416+ ///< the context
24142417 const ur_context_native_properties_t *pProperties, ///< [in][optional] pointer to native context properties struct
24152418 ur_context_handle_t *phContext ///< [out] pointer to the handle of the context object created.
24162419);
@@ -5278,6 +5281,8 @@ typedef struct ur_kernel_native_properties_t {
52785281/// - The application may call this function from simultaneous threads for
52795282/// the same context.
52805283/// - The implementation of this function should be thread-safe.
5284+ /// - The implementation may require a valid program handle to return the
5285+ /// native kernel handle
52815286///
52825287/// @returns
52835288/// - ::UR_RESULT_SUCCESS
@@ -5286,7 +5291,7 @@ typedef struct ur_kernel_native_properties_t {
52865291/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
52875292/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
52885293/// + `NULL == hContext`
5289- /// + `NULL == hProgram`
5294+ /// + If `hProgram == NULL` and the implementation requires a valid program.
52905295/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
52915296/// + `NULL == phKernel`
52925297/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
@@ -5295,7 +5300,7 @@ UR_APIEXPORT ur_result_t UR_APICALL
52955300urKernelCreateWithNativeHandle(
52965301 ur_native_handle_t hNativeKernel, ///< [in][nocheck] the native handle of the kernel.
52975302 ur_context_handle_t hContext, ///< [in] handle of the context object
5298- ur_program_handle_t hProgram, ///< [in] handle of the program associated with the kernel
5303+ ur_program_handle_t hProgram, ///< [in][optional] handle of the program associated with the kernel
52995304 const ur_kernel_native_properties_t *pProperties, ///< [in][optional] pointer to native kernel properties struct
53005305 ur_kernel_handle_t *phKernel ///< [out] pointer to the handle of the kernel object created.
53015306);
@@ -5625,7 +5630,6 @@ typedef struct ur_queue_native_properties_t {
56255630/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
56265631/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
56275632/// + `NULL == hContext`
5628- /// + `NULL == hDevice`
56295633/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
56305634/// + `NULL == phQueue`
56315635/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
@@ -5634,7 +5638,7 @@ UR_APIEXPORT ur_result_t UR_APICALL
56345638urQueueCreateWithNativeHandle(
56355639 ur_native_handle_t hNativeQueue, ///< [in][nocheck] the native handle of the queue.
56365640 ur_context_handle_t hContext, ///< [in] handle of the context object
5637- ur_device_handle_t hDevice, ///< [in] handle of the device object
5641+ ur_device_handle_t hDevice, ///< [in][optional] handle of the device object
56385642 const ur_queue_native_properties_t *pProperties, ///< [in][optional] pointer to native queue properties struct
56395643 ur_queue_handle_t *phQueue ///< [out] pointer to the handle of the queue object created.
56405644);
@@ -9822,6 +9826,7 @@ typedef struct ur_context_get_native_handle_params_t {
98229826/// allowing the callback the ability to modify the parameter's value
98239827typedef struct ur_context_create_with_native_handle_params_t {
98249828 ur_native_handle_t *phNativeContext;
9829+ ur_adapter_handle_t *phAdapter;
98259830 uint32_t *pnumDevices;
98269831 const ur_device_handle_t **pphDevices;
98279832 const ur_context_native_properties_t **ppProperties;
0 commit comments