@@ -233,6 +233,7 @@ typedef enum ur_function_t {
233233 UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT = 246, ///< Enumerator for ::urEnqueueEventsWaitWithBarrierExt
234234 UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP = 247, ///< Enumerator for ::urTensorMapEncodeIm2ColExp
235235 UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP = 248, ///< Enumerator for ::urTensorMapEncodeTiledExp
236+ UR_FUNCTION_PHYSICAL_MEM_GET_INFO = 249, ///< Enumerator for ::urPhysicalMemGetInfo
236237 /// @cond
237238 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
238239 /// @endcond
@@ -2525,7 +2526,7 @@ typedef enum ur_mem_type_t {
25252526///////////////////////////////////////////////////////////////////////////////
25262527/// @brief Memory Information type
25272528typedef enum ur_mem_info_t {
2528- UR_MEM_INFO_SIZE = 0, ///< [size_t] actual size of of memory object in bytes
2529+ UR_MEM_INFO_SIZE = 0, ///< [size_t] actual size of the memory object in bytes
25292530 UR_MEM_INFO_CONTEXT = 1, ///< [::ur_context_handle_t] context in which the memory object was created
25302531 UR_MEM_INFO_REFERENCE_COUNT = 2, ///< [uint32_t] Reference count of the memory object.
25312532 ///< The reference count returned should be considered immediately stale.
@@ -4138,6 +4139,50 @@ urPhysicalMemRelease(
41384139 ur_physical_mem_handle_t hPhysicalMem ///< [in][release] handle of the physical memory object to release.
41394140);
41404141
4142+ ///////////////////////////////////////////////////////////////////////////////
4143+ /// @brief Physical memory range info queries.
4144+ typedef enum ur_physical_mem_info_t {
4145+ UR_PHYSICAL_MEM_INFO_CONTEXT = 0, ///< [::ur_context_handle_t] context in which the physical memory object
4146+ ///< was created.
4147+ UR_PHYSICAL_MEM_INFO_DEVICE = 1, ///< [::ur_device_handle_t] device associated with this physical memory
4148+ ///< object.
4149+ UR_PHYSICAL_MEM_INFO_SIZE = 2, ///< [size_t] actual size of the physical memory object in bytes.
4150+ UR_PHYSICAL_MEM_INFO_PROPERTIES = 3, ///< [::ur_physical_mem_properties_t] properties set when creating this
4151+ ///< physical memory object.
4152+ UR_PHYSICAL_MEM_INFO_REFERENCE_COUNT = 4, ///< [uint32_t] Reference count of the physical memory object.
4153+ ///< The reference count returned should be considered immediately stale.
4154+ ///< It is unsuitable for general use in applications. This feature is
4155+ ///< provided for identifying memory leaks.
4156+ /// @cond
4157+ UR_PHYSICAL_MEM_INFO_FORCE_UINT32 = 0x7fffffff
4158+ /// @endcond
4159+
4160+ } ur_physical_mem_info_t;
4161+
4162+ ///////////////////////////////////////////////////////////////////////////////
4163+ /// @brief Get information about a physical memory object.
4164+ ///
4165+ /// @returns
4166+ /// - ::UR_RESULT_SUCCESS
4167+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
4168+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
4169+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4170+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4171+ /// + `NULL == hPhysicalMem`
4172+ /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
4173+ /// + `::UR_PHYSICAL_MEM_INFO_REFERENCE_COUNT < propName`
4174+ UR_APIEXPORT ur_result_t UR_APICALL
4175+ urPhysicalMemGetInfo(
4176+ ur_physical_mem_handle_t hPhysicalMem, ///< [in] handle of the physical memory object to query.
4177+ ur_physical_mem_info_t propName, ///< [in] type of the info to query.
4178+ size_t propSize, ///< [in] size in bytes of the memory pointed to by pPropValue.
4179+ void *pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding
4180+ ///< the info. If propSize is less than the real number of bytes needed to
4181+ ///< return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is
4182+ ///< returned and pPropValue is not used.
4183+ size_t *pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName."
4184+ );
4185+
41414186#if !defined(__GNUC__)
41424187#pragma endregion
41434188#endif
@@ -8517,6 +8562,7 @@ urCommandBufferReleaseExp(
85178562/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
85188563/// + `NULL == hCommandBuffer`
85198564/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
8565+ /// - ::UR_RESULT_ERROR_INVALID_OPERATION - "If `hCommandBuffer` has already been finalized"
85208566/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
85218567/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
85228568UR_APIEXPORT ur_result_t UR_APICALL
@@ -11317,6 +11363,18 @@ typedef struct ur_physical_mem_release_params_t {
1131711363 ur_physical_mem_handle_t *phPhysicalMem;
1131811364} ur_physical_mem_release_params_t;
1131911365
11366+ ///////////////////////////////////////////////////////////////////////////////
11367+ /// @brief Function parameters for urPhysicalMemGetInfo
11368+ /// @details Each entry is a pointer to the parameter passed to the function;
11369+ /// allowing the callback the ability to modify the parameter's value
11370+ typedef struct ur_physical_mem_get_info_params_t {
11371+ ur_physical_mem_handle_t *phPhysicalMem;
11372+ ur_physical_mem_info_t *ppropName;
11373+ size_t *ppropSize;
11374+ void **ppPropValue;
11375+ size_t **ppPropSizeRet;
11376+ } ur_physical_mem_get_info_params_t;
11377+
1132011378///////////////////////////////////////////////////////////////////////////////
1132111379/// @brief Function parameters for urAdapterGet
1132211380/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments