Skip to content

Commit

Permalink
Merge pull request #2165 from aarongreig/aaron/makeUSMPoolsOptional
Browse files Browse the repository at this point in the history
Make USM pools optional with a device query to report support.
  • Loading branch information
callumfare authored Nov 4, 2024
2 parents fa8cc8e + a0cf2ce commit b0a9e2b
Show file tree
Hide file tree
Showing 26 changed files with 162 additions and 185 deletions.
17 changes: 14 additions & 3 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,9 @@ typedef enum ur_device_info_t {
UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 118, ///< [::ur_bool_t] return true if the device supports the
///< `EnqueueDeviceGlobalVariableWrite` and
///< `EnqueueDeviceGlobalVariableRead` entry points.
UR_DEVICE_INFO_USM_POOL_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains
///< to the `USMPool` entry points and usage of the `pool` parameter of the
///< USM alloc entry points.
UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, ///< [::ur_bool_t] Returns true if the device supports the use of
///< command-buffers.
UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP = 0x1001, ///< [::ur_device_command_buffer_update_capability_flags_t] Command-buffer
Expand Down Expand Up @@ -3503,7 +3506,6 @@ typedef struct ur_usm_pool_limits_desc_t {
/// @brief USM allocate host memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -3536,6 +3538,8 @@ typedef struct ur_usm_pool_limits_desc_t {
/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
UR_APIEXPORT ur_result_t UR_APICALL
urUSMHostAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand All @@ -3549,7 +3553,6 @@ urUSMHostAlloc(
/// @brief USM allocate device memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -3583,6 +3586,8 @@ urUSMHostAlloc(
/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
UR_APIEXPORT ur_result_t UR_APICALL
urUSMDeviceAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand All @@ -3597,7 +3602,6 @@ urUSMDeviceAlloc(
/// @brief USM allocate shared memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -3632,6 +3636,8 @@ urUSMDeviceAlloc(
/// + If `UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT` and `UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT` are both false.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
UR_APIEXPORT ur_result_t UR_APICALL
urUSMSharedAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand Down Expand Up @@ -3713,6 +3719,8 @@ urUSMGetMemAllocInfo(
/// + `::UR_USM_POOL_FLAGS_MASK & pPoolDesc->flags`
/// - ::UR_RESULT_ERROR_INVALID_VALUE
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolCreate(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand All @@ -3731,6 +3739,7 @@ urUSMPoolCreate(
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == pPool`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolRetain(
ur_usm_pool_handle_t pPool ///< [in][retain] pointer to USM memory pool
Expand All @@ -3753,6 +3762,7 @@ urUSMPoolRetain(
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == pPool`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolRelease(
ur_usm_pool_handle_t pPool ///< [in][release] pointer to USM memory pool
Expand Down Expand Up @@ -3794,6 +3804,7 @@ typedef enum ur_usm_pool_info_t {
/// + `pPropValue == NULL && pPropSizeRet == NULL`
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolGetInfo(
ur_usm_pool_handle_t hPool, ///< [in] handle of the USM memory pool
Expand Down
15 changes: 15 additions & 0 deletions include/ur_print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT:
os << "UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT";
break;
case UR_DEVICE_INFO_USM_POOL_SUPPORT:
os << "UR_DEVICE_INFO_USM_POOL_SUPPORT";
break;
case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP:
os << "UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP";
break;
Expand Down Expand Up @@ -4052,6 +4055,18 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info

os << ")";
} break;
case UR_DEVICE_INFO_USM_POOL_SUPPORT: {
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
if (sizeof(ur_bool_t) > size) {
os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")";
return UR_RESULT_ERROR_INVALID_SIZE;
}
os << (const void *)(tptr) << " (";

os << *tptr;

os << ")";
} break;
case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: {
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
if (sizeof(ur_bool_t) > size) {
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ etors:
desc: "[$x_device_handle_t] The composite device containing this component device."
- name: GLOBAL_VARIABLE_SUPPORT
desc: "[$x_bool_t] return true if the device supports the `EnqueueDeviceGlobalVariableWrite` and `EnqueueDeviceGlobalVariableRead` entry points."
- name: USM_POOL_SUPPORT
desc: "[$x_bool_t] return true if the device supports USM pooling. Pertains to the `USMPool` entry points and usage of the `pool` parameter of the USM alloc entry points."
--- #--------------------------------------------------------------------------
type: function
desc: "Retrieves various information about device"
Expand Down
14 changes: 11 additions & 3 deletions scripts/core/usm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ class: $xUSM
name: HostAlloc
ordinal: "0"
details:
- "This function must support memory pooling."
- "If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation will be served from a specified memory pool."
- "Otherwise, the behavior is implementation-defined."
- "Allocations served from different memory pools must be isolated and must not reside on the same page."
Expand Down Expand Up @@ -264,14 +263,15 @@ returns:
- "`size` is greater than $X_DEVICE_INFO_MAX_MEM_ALLOC_SIZE."
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_OUT_OF_RESOURCES
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE:
- "If any device associated with `hContext` reports `false` for $X_DEVICE_INFO_USM_POOL_SUPPORT"
--- #--------------------------------------------------------------------------
type: function
desc: "USM allocate device memory"
class: $xUSM
name: DeviceAlloc
ordinal: "0"
details:
- "This function must support memory pooling."
- "If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation will be served from a specified memory pool."
- "Otherwise, the behavior is implementation-defined."
- "Allocations served from different memory pools must be isolated and must not reside on the same page."
Expand Down Expand Up @@ -309,14 +309,15 @@ returns:
- "`size` is greater than $X_DEVICE_INFO_MAX_MEM_ALLOC_SIZE."
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_OUT_OF_RESOURCES
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE:
- "If any device associated with `hContext` reports `false` for $X_DEVICE_INFO_USM_POOL_SUPPORT"
--- #--------------------------------------------------------------------------
type: function
desc: "USM allocate shared memory"
class: $xUSM
name: SharedAlloc
ordinal: "0"
details:
- "This function must support memory pooling."
- "If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation will be served from a specified memory pool."
- "Otherwise, the behavior is implementation-defined."
- "Allocations served from different memory pools must be isolated and must not reside on the same page."
Expand Down Expand Up @@ -355,6 +356,8 @@ returns:
- "If `UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT` and `UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT` are both false."
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_OUT_OF_RESOURCES
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE:
- "If any device associated with `hContext` reports `false` for $X_DEVICE_INFO_USM_POOL_SUPPORT"
--- #--------------------------------------------------------------------------
type: function
desc: "Free the USM memory object"
Expand Down Expand Up @@ -424,6 +427,8 @@ returns:
- $X_RESULT_ERROR_INVALID_NULL_HANDLE
- $X_RESULT_ERROR_INVALID_VALUE
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE:
- "If any device associated with `hContext` reports `false` for $X_DEVICE_INFO_USM_POOL_SUPPORT"
--- #--------------------------------------------------------------------------
type: function
desc: "Get a reference to the pool handle. Increment its reference count"
Expand All @@ -436,6 +441,7 @@ params:
desc: "[in][retain] pointer to USM memory pool"
returns:
- $X_RESULT_ERROR_INVALID_NULL_HANDLE
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE
--- #--------------------------------------------------------------------------
type: function
desc: "Decrement the pool's reference count and delete the pool if the reference count becomes zero."
Expand All @@ -452,6 +458,7 @@ params:
desc: "[in][release] pointer to USM memory pool"
returns:
- $X_RESULT_ERROR_INVALID_NULL_HANDLE
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE
--- #--------------------------------------------------------------------------
type: enum
desc: "Get USM memory pool information"
Expand Down Expand Up @@ -499,3 +506,4 @@ returns:
- "`pPropValue == NULL && pPropSizeRet == NULL`"
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_OUT_OF_RESOURCES
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE
2 changes: 2 additions & 0 deletions source/adapters/cuda/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
return ReturnValue(static_cast<ur_bool_t>(false));
case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT:
return ReturnValue(static_cast<ur_bool_t>(true));
case UR_DEVICE_INFO_USM_POOL_SUPPORT:
return ReturnValue(static_cast<ur_bool_t>(true));
case UR_DEVICE_INFO_COMPONENT_DEVICES:
case UR_DEVICE_INFO_COMPOSITE_DEVICE:
case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS:
Expand Down
2 changes: 2 additions & 0 deletions source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,

case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT:
return ReturnValue(ur_bool_t{false});
case UR_DEVICE_INFO_USM_POOL_SUPPORT:
return ReturnValue(ur_bool_t{true});
// TODO: Investigate if this information is available on HIP.
case UR_DEVICE_INFO_COMPONENT_DEVICES:
case UR_DEVICE_INFO_COMPOSITE_DEVICE:
Expand Down
2 changes: 2 additions & 0 deletions source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,8 @@ ur_result_t urDeviceGetInfo(
return ReturnValue(false);
case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT:
return ReturnValue(true);
case UR_DEVICE_INFO_USM_POOL_SUPPORT:
return ReturnValue(true);
default:
logger::error("Unsupported ParamName in urGetDeviceInfo");
logger::error("ParamNameParamName={}(0x{})", ParamName,
Expand Down
3 changes: 3 additions & 0 deletions source/adapters/native_cpu/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP:
return ReturnValue(false);

case UR_DEVICE_INFO_USM_POOL_SUPPORT:
return ReturnValue(false);

default:
DIE_NO_IMPLEMENTATION;
}
Expand Down
5 changes: 5 additions & 0 deletions source/adapters/opencl/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS: {
return ReturnValue(false);
}

case UR_DEVICE_INFO_USM_POOL_SUPPORT: {
return ReturnValue(false);
}

/* TODO: Check regularly to see if support is enabled in OpenCL. Intel GPU
* EU device-specific information extensions. Some of the queries are
* enabled by cl_intel_device_attribute_query extension, but it's not yet in
Expand Down
8 changes: 4 additions & 4 deletions source/adapters/opencl/ur_interface_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ urGetUSMProcAddrTable(ur_api_version_t Version, ur_usm_dditable_t *pDdiTable) {
pDdiTable->pfnFree = urUSMFree;
pDdiTable->pfnGetMemAllocInfo = urUSMGetMemAllocInfo;
pDdiTable->pfnHostAlloc = urUSMHostAlloc;
pDdiTable->pfnPoolCreate = nullptr;
pDdiTable->pfnPoolRetain = nullptr;
pDdiTable->pfnPoolRelease = nullptr;
pDdiTable->pfnPoolGetInfo = nullptr;
pDdiTable->pfnPoolCreate = urUSMPoolCreate;
pDdiTable->pfnPoolRetain = urUSMPoolRetain;
pDdiTable->pfnPoolRelease = urUSMPoolRelease;
pDdiTable->pfnPoolGetInfo = urUSMPoolGetInfo;
pDdiTable->pfnSharedAlloc = urUSMSharedAlloc;
return UR_RESULT_SUCCESS;
}
Expand Down
25 changes: 25 additions & 0 deletions source/adapters/opencl/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,3 +703,28 @@ urUSMReleaseExp([[maybe_unused]] ur_context_handle_t Context,
[[maybe_unused]] void *HostPtr) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolCreate([[maybe_unused]] ur_context_handle_t hContext,
[[maybe_unused]] ur_usm_pool_desc_t *pPoolDesc,
[[maybe_unused]] ur_usm_pool_handle_t *ppPool) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolRetain([[maybe_unused]] ur_usm_pool_handle_t pPool) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urUSMPoolRelease([[maybe_unused]] ur_usm_pool_handle_t pPool) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolGetInfo(
[[maybe_unused]] ur_usm_pool_handle_t hPool,
[[maybe_unused]] ur_usm_pool_info_t propName,
[[maybe_unused]] size_t propSize, [[maybe_unused]] void *pPropValue,
[[maybe_unused]] size_t *pPropSizeRet) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
14 changes: 11 additions & 3 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,6 @@ ur_result_t UR_APICALL urSamplerCreateWithNativeHandle(
/// @brief USM allocate host memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -2258,6 +2257,8 @@ ur_result_t UR_APICALL urSamplerCreateWithNativeHandle(
/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
ur_result_t UR_APICALL urUSMHostAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
const ur_usm_desc_t
Expand All @@ -2282,7 +2283,6 @@ ur_result_t UR_APICALL urUSMHostAlloc(
/// @brief USM allocate device memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -2316,6 +2316,8 @@ ur_result_t UR_APICALL urUSMHostAlloc(
/// + `size` is greater than ::UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
ur_result_t UR_APICALL urUSMDeviceAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand All @@ -2341,7 +2343,6 @@ ur_result_t UR_APICALL urUSMDeviceAlloc(
/// @brief USM allocate shared memory
///
/// @details
/// - This function must support memory pooling.
/// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation
/// will be served from a specified memory pool.
/// - Otherwise, the behavior is implementation-defined.
Expand Down Expand Up @@ -2376,6 +2377,8 @@ ur_result_t UR_APICALL urUSMDeviceAlloc(
/// + If `UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT` and `UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT` are both false.
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
ur_result_t UR_APICALL urUSMSharedAlloc(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand Down Expand Up @@ -2490,6 +2493,8 @@ ur_result_t UR_APICALL urUSMGetMemAllocInfo(
/// + `::UR_USM_POOL_FLAGS_MASK & pPoolDesc->flags`
/// - ::UR_RESULT_ERROR_INVALID_VALUE
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT
ur_result_t UR_APICALL urUSMPoolCreate(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_usm_pool_desc_t *
Expand Down Expand Up @@ -2517,6 +2522,7 @@ ur_result_t UR_APICALL urUSMPoolCreate(
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == pPool`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
ur_result_t UR_APICALL urUSMPoolRetain(
ur_usm_pool_handle_t pPool ///< [in][retain] pointer to USM memory pool
) try {
Expand Down Expand Up @@ -2547,6 +2553,7 @@ ur_result_t UR_APICALL urUSMPoolRetain(
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == pPool`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
ur_result_t UR_APICALL urUSMPoolRelease(
ur_usm_pool_handle_t pPool ///< [in][release] pointer to USM memory pool
) try {
Expand Down Expand Up @@ -2582,6 +2589,7 @@ ur_result_t UR_APICALL urUSMPoolRelease(
/// + `pPropValue == NULL && pPropSizeRet == NULL`
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
ur_result_t UR_APICALL urUSMPoolGetInfo(
ur_usm_pool_handle_t hPool, ///< [in] handle of the USM memory pool
ur_usm_pool_info_t propName, ///< [in] name of the pool property to query
Expand Down
Loading

0 comments on commit b0a9e2b

Please sign in to comment.