@@ -1639,6 +1639,9 @@ typedef enum ur_device_info_t {
16391639 UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 118, ///< [::ur_bool_t] return true if the device supports the
16401640 ///< `EnqueueDeviceGlobalVariableWrite` and
16411641 ///< `EnqueueDeviceGlobalVariableRead` entry points.
1642+ UR_DEVICE_INFO_USM_POOL_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains
1643+ ///< to the `USMPool` entry points and usage of the `pool` parameter of the
1644+ ///< USM alloc entry points.
16421645 UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, ///< [::ur_bool_t] Returns true if the device supports the use of
16431646 ///< command-buffers.
16441647 UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP = 0x1001, ///< [::ur_device_command_buffer_update_capability_flags_t] Command-buffer
@@ -3503,7 +3506,6 @@ typedef struct ur_usm_pool_limits_desc_t {
35033506/// @brief USM allocate host memory
35043507///
35053508/// @details
3506- /// - This function must support memory pooling.
35073509/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
35083510/// will be served from a specified memory pool.
35093511/// - Otherwise, the behavior is implementation-defined.
@@ -3536,6 +3538,8 @@ typedef struct ur_usm_pool_limits_desc_t {
35363538/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
35373539/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
35383540/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
3541+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3542+ /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
35393543UR_APIEXPORT ur_result_t UR_APICALL
35403544urUSMHostAlloc(
35413545 ur_context_handle_t hContext, ///< [in] handle of the context object
@@ -3549,7 +3553,6 @@ urUSMHostAlloc(
35493553/// @brief USM allocate device memory
35503554///
35513555/// @details
3552- /// - This function must support memory pooling.
35533556/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
35543557/// will be served from a specified memory pool.
35553558/// - Otherwise, the behavior is implementation-defined.
@@ -3583,6 +3586,8 @@ urUSMHostAlloc(
35833586/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
35843587/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
35853588/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
3589+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3590+ /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
35863591UR_APIEXPORT ur_result_t UR_APICALL
35873592urUSMDeviceAlloc(
35883593 ur_context_handle_t hContext, ///< [in] handle of the context object
@@ -3597,7 +3602,6 @@ urUSMDeviceAlloc(
35973602/// @brief USM allocate shared memory
35983603///
35993604/// @details
3600- /// - This function must support memory pooling.
36013605/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
36023606/// will be served from a specified memory pool.
36033607/// - Otherwise, the behavior is implementation-defined.
@@ -3632,6 +3636,8 @@ urUSMDeviceAlloc(
36323636/// + If `UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT` and `UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT` are both false.
36333637/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
36343638/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
3639+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3640+ /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
36353641UR_APIEXPORT ur_result_t UR_APICALL
36363642urUSMSharedAlloc(
36373643 ur_context_handle_t hContext, ///< [in] handle of the context object
@@ -3713,6 +3719,8 @@ urUSMGetMemAllocInfo(
37133719/// + `::UR_USM_POOL_FLAGS_MASK & pPoolDesc->flags`
37143720/// - ::UR_RESULT_ERROR_INVALID_VALUE
37153721/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
3722+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3723+ /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
37163724UR_APIEXPORT ur_result_t UR_APICALL
37173725urUSMPoolCreate(
37183726 ur_context_handle_t hContext, ///< [in] handle of the context object
@@ -3731,6 +3739,7 @@ urUSMPoolCreate(
37313739/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
37323740/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
37333741/// + `NULL == pPool`
3742+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
37343743UR_APIEXPORT ur_result_t UR_APICALL
37353744urUSMPoolRetain(
37363745 ur_usm_pool_handle_t pPool ///< [in][retain] pointer to USM memory pool
@@ -3753,6 +3762,7 @@ urUSMPoolRetain(
37533762/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
37543763/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
37553764/// + `NULL == pPool`
3765+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
37563766UR_APIEXPORT ur_result_t UR_APICALL
37573767urUSMPoolRelease(
37583768 ur_usm_pool_handle_t pPool ///< [in][release] pointer to USM memory pool
@@ -3794,6 +3804,7 @@ typedef enum ur_usm_pool_info_t {
37943804/// + `pPropValue == NULL && pPropSizeRet == NULL`
37953805/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
37963806/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
3807+ /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
37973808UR_APIEXPORT ur_result_t UR_APICALL
37983809urUSMPoolGetInfo(
37993810 ur_usm_pool_handle_t hPool, ///< [in] handle of the USM memory pool
0 commit comments