@@ -233,6 +233,7 @@ typedef enum ur_function_t {
233
233
UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT = 246, ///< Enumerator for ::urEnqueueEventsWaitWithBarrierExt
234
234
UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP = 247, ///< Enumerator for ::urTensorMapEncodeIm2ColExp
235
235
UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP = 248, ///< Enumerator for ::urTensorMapEncodeTiledExp
236
+ UR_FUNCTION_PHYSICAL_MEM_GET_INFO = 249, ///< Enumerator for ::urPhysicalMemGetInfo
236
237
/// @cond
237
238
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
238
239
/// @endcond
@@ -2525,7 +2526,7 @@ typedef enum ur_mem_type_t {
2525
2526
///////////////////////////////////////////////////////////////////////////////
2526
2527
/// @brief Memory Information type
2527
2528
typedef 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
2529
2530
UR_MEM_INFO_CONTEXT = 1, ///< [::ur_context_handle_t] context in which the memory object was created
2530
2531
UR_MEM_INFO_REFERENCE_COUNT = 2, ///< [uint32_t] Reference count of the memory object.
2531
2532
///< The reference count returned should be considered immediately stale.
@@ -4138,6 +4139,50 @@ urPhysicalMemRelease(
4138
4139
ur_physical_mem_handle_t hPhysicalMem ///< [in][release] handle of the physical memory object to release.
4139
4140
);
4140
4141
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
+
4141
4186
#if !defined(__GNUC__)
4142
4187
#pragma endregion
4143
4188
#endif
@@ -8517,6 +8562,7 @@ urCommandBufferReleaseExp(
8517
8562
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8518
8563
/// + `NULL == hCommandBuffer`
8519
8564
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
8565
+ /// - ::UR_RESULT_ERROR_INVALID_OPERATION - "If `hCommandBuffer` has already been finalized"
8520
8566
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
8521
8567
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
8522
8568
UR_APIEXPORT ur_result_t UR_APICALL
@@ -11317,6 +11363,18 @@ typedef struct ur_physical_mem_release_params_t {
11317
11363
ur_physical_mem_handle_t *phPhysicalMem;
11318
11364
} ur_physical_mem_release_params_t;
11319
11365
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
+
11320
11378
///////////////////////////////////////////////////////////////////////////////
11321
11379
/// @brief Function parameters for urAdapterGet
11322
11380
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments