From 850e941c0720390ebde1f13a4e7b6efd8579b4ab Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Wed, 2 Oct 2024 15:57:32 +0100 Subject: [PATCH] Make USM pools optional with a device query to report support. --- include/ur_api.h | 14 ++++ include/ur_print.hpp | 15 ++++ scripts/core/device.yml | 2 + scripts/core/usm.yml | 11 +++ source/adapters/cuda/device.cpp | 2 + source/adapters/hip/device.cpp | 2 + source/adapters/level_zero/device.cpp | 2 + source/adapters/native_cpu/device.cpp | 3 + source/adapters/opencl/device.cpp | 5 ++ .../adapters/opencl/ur_interface_loader.cpp | 8 +- source/adapters/opencl/usm.cpp | 25 ++++++ source/loader/ur_libapi.cpp | 11 +++ source/ur_api.cpp | 11 +++ test/conformance/device/urDeviceGetInfo.cpp | 5 +- .../enqueue/enqueue_adapter_opencl.match | 1 - .../enqueue/urEnqueueKernelLaunch.cpp | 5 ++ .../testing/include/uur/fixtures.h | 10 +++ test/conformance/testing/include/uur/utils.h | 2 + test/conformance/testing/source/utils.cpp | 6 ++ test/conformance/usm/urUSMDeviceAlloc.cpp | 6 ++ test/conformance/usm/urUSMHostAlloc.cpp | 5 ++ test/conformance/usm/urUSMPoolCreate.cpp | 12 ++- test/conformance/usm/urUSMSharedAlloc.cpp | 5 ++ .../usm/usm_adapter_native_cpu.match | 80 ------------------ test/conformance/usm/usm_adapter_opencl.match | 84 ------------------- tools/urinfo/urinfo.hpp | 2 + 26 files changed, 162 insertions(+), 172 deletions(-) diff --git a/include/ur_api.h b/include/ur_api.h index 3cf5f99624..8bb5e5aa2c 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -1636,6 +1636,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 @@ -3533,6 +3536,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 @@ -3580,6 +3585,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 @@ -3629,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 @@ -3710,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 @@ -3728,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 @@ -3750,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 @@ -3791,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 diff --git a/include/ur_print.hpp b/include/ur_print.hpp index 417f33b818..99ccb6a87a 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -2541,6 +2541,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; @@ -4040,6 +4043,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) { diff --git a/scripts/core/device.yml b/scripts/core/device.yml index c063466b22..16a2ce2bed 100644 --- a/scripts/core/device.yml +++ b/scripts/core/device.yml @@ -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" diff --git a/scripts/core/usm.yml b/scripts/core/usm.yml index da5cd8c578..497a1bec06 100644 --- a/scripts/core/usm.yml +++ b/scripts/core/usm.yml @@ -264,6 +264,8 @@ 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" @@ -309,6 +311,8 @@ 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" @@ -355,6 +359,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" @@ -424,6 +430,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" @@ -436,6 +444,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." @@ -452,6 +461,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" @@ -499,3 +509,4 @@ returns: - "`pPropValue == NULL && pPropSizeRet == NULL`" - $X_RESULT_ERROR_OUT_OF_HOST_MEMORY - $X_RESULT_ERROR_OUT_OF_RESOURCES + - $X_RESULT_ERROR_UNSUPPORTED_FEATURE diff --git a/source/adapters/cuda/device.cpp b/source/adapters/cuda/device.cpp index cf3082e7cf..6ade89a26b 100644 --- a/source/adapters/cuda/device.cpp +++ b/source/adapters/cuda/device.cpp @@ -1076,6 +1076,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(static_cast(false)); case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT: return ReturnValue(static_cast(true)); + case UR_DEVICE_INFO_USM_POOL_SUPPORT: + return ReturnValue(static_cast(true)); case UR_DEVICE_INFO_COMPONENT_DEVICES: case UR_DEVICE_INFO_COMPOSITE_DEVICE: case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: diff --git a/source/adapters/hip/device.cpp b/source/adapters/hip/device.cpp index be3188b50d..dc07347357 100644 --- a/source/adapters/hip/device.cpp +++ b/source/adapters/hip/device.cpp @@ -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: diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index 6f91df3875..15ee1c18ce 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -1145,6 +1145,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, diff --git a/source/adapters/native_cpu/device.cpp b/source/adapters/native_cpu/device.cpp index 15dbed75c9..f157b8c673 100644 --- a/source/adapters/native_cpu/device.cpp +++ b/source/adapters/native_cpu/device.cpp @@ -411,6 +411,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; } diff --git a/source/adapters/opencl/device.cpp b/source/adapters/opencl/device.cpp index 25d1dd23d9..edb2fc7aa4 100644 --- a/source/adapters/opencl/device.cpp +++ b/source/adapters/opencl/device.cpp @@ -1048,6 +1048,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 diff --git a/source/adapters/opencl/ur_interface_loader.cpp b/source/adapters/opencl/ur_interface_loader.cpp index 100bb888cf..5f1710fe91 100644 --- a/source/adapters/opencl/ur_interface_loader.cpp +++ b/source/adapters/opencl/ur_interface_loader.cpp @@ -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; } diff --git a/source/adapters/opencl/usm.cpp b/source/adapters/opencl/usm.cpp index 58ce4c0fc6..2f22461ad4 100644 --- a/source/adapters/opencl/usm.cpp +++ b/source/adapters/opencl/usm.cpp @@ -595,3 +595,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; +} diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 1e90ccb2bb..851874a693 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -2257,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 @@ -2315,6 +2317,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 @@ -2375,6 +2379,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 @@ -2489,6 +2495,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 * @@ -2516,6 +2524,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 { @@ -2546,6 +2555,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 { @@ -2581,6 +2591,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 diff --git a/source/ur_api.cpp b/source/ur_api.cpp index e850247f84..863cb7a468 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -1951,6 +1951,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 @@ -2003,6 +2005,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 @@ -2057,6 +2061,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 @@ -2151,6 +2157,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 * @@ -2172,6 +2180,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 ) { @@ -2196,6 +2205,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 ) { @@ -2225,6 +2235,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 diff --git a/test/conformance/device/urDeviceGetInfo.cpp b/test/conformance/device/urDeviceGetInfo.cpp index 14fedf728f..e41cff97ed 100644 --- a/test/conformance/device/urDeviceGetInfo.cpp +++ b/test/conformance/device/urDeviceGetInfo.cpp @@ -115,7 +115,7 @@ static std::unordered_map device_info_size_map = { {UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, sizeof(uint32_t)}, {UR_DEVICE_INFO_COMPONENT_DEVICES, sizeof(uint32_t)}, {UR_DEVICE_INFO_COMPOSITE_DEVICE, sizeof(ur_device_handle_t)}, -}; + {UR_DEVICE_INFO_USM_POOL_SUPPORT, sizeof(ur_bool_t)}}; struct urDeviceGetInfoTest : uur::urAllDevicesTest, ::testing::WithParamInterface { @@ -236,7 +236,8 @@ INSTANTIATE_TEST_SUITE_P( UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, // UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, // UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT, // - UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS // + UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, // + UR_DEVICE_INFO_USM_POOL_SUPPORT // ), [](const ::testing::TestParamInfo &info) { std::stringstream ss; diff --git a/test/conformance/enqueue/enqueue_adapter_opencl.match b/test/conformance/enqueue/enqueue_adapter_opencl.match index 27ae88c43d..1fc952e3c2 100644 --- a/test/conformance/enqueue/enqueue_adapter_opencl.match +++ b/test/conformance/enqueue/enqueue_adapter_opencl.match @@ -1,3 +1,2 @@ {{NONDETERMINISTIC}} urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__OpenCL___{{.*}}_ -{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__OpenCL___{{.*}}_UsePoolEnabled diff --git a/test/conformance/enqueue/urEnqueueKernelLaunch.cpp b/test/conformance/enqueue/urEnqueueKernelLaunch.cpp index aa1c436fa8..76b60835ba 100644 --- a/test/conformance/enqueue/urEnqueueKernelLaunch.cpp +++ b/test/conformance/enqueue/urEnqueueKernelLaunch.cpp @@ -514,6 +514,11 @@ struct urEnqueueKernelLaunchUSMLinkedList ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr, 0}; if (use_pool) { + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ASSERT_SUCCESS(urUSMPoolCreate(this->context, &pool_desc, &pool)); } } diff --git a/test/conformance/testing/include/uur/fixtures.h b/test/conformance/testing/include/uur/fixtures.h index 0aeee2d909..90a20bbb4f 100644 --- a/test/conformance/testing/include/uur/fixtures.h +++ b/test/conformance/testing/include/uur/fixtures.h @@ -846,6 +846,11 @@ struct urUSMDeviceAllocTest : urQueueTest { struct urUSMPoolTest : urContextTest { void SetUp() override { UUR_RETURN_ON_FATAL_FAILURE(urContextTest::SetUp()); + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr, 0}; ASSERT_SUCCESS(urUSMPoolCreate(this->context, &pool_desc, &pool)); @@ -864,6 +869,11 @@ struct urUSMPoolTest : urContextTest { template struct urUSMPoolTestWithParam : urContextTestWithParam { void SetUp() override { UUR_RETURN_ON_FATAL_FAILURE(urContextTestWithParam::SetUp()); + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(this->device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr, 0}; ASSERT_SUCCESS(urUSMPoolCreate(this->context, &pool_desc, &pool)); diff --git a/test/conformance/testing/include/uur/utils.h b/test/conformance/testing/include/uur/utils.h index a1febf9769..339564b06a 100644 --- a/test/conformance/testing/include/uur/utils.h +++ b/test/conformance/testing/include/uur/utils.h @@ -384,6 +384,8 @@ ur_result_t GetDeviceUSMCrossSharedSupport( ur_result_t GetDeviceUSMSystemSharedSupport( ur_device_handle_t device, ur_device_usm_access_capability_flags_t &support); +ur_result_t GetDeviceUSMPoolSupport(ur_device_handle_t device, + ur_bool_t &support); ur_result_t GetDeviceUUID(ur_device_handle_t device, std::string &uuid); ur_result_t GetDevicePCIAddress(ur_device_handle_t device, std::string &address); diff --git a/test/conformance/testing/source/utils.cpp b/test/conformance/testing/source/utils.cpp index ab78f64bbc..0ab058bc30 100644 --- a/test/conformance/testing/source/utils.cpp +++ b/test/conformance/testing/source/utils.cpp @@ -562,6 +562,12 @@ ur_result_t GetDeviceUSMSystemSharedSupport( device, UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, support); } +ur_result_t GetDeviceUSMPoolSupport(ur_device_handle_t device, + ur_bool_t &support) { + return GetDeviceInfo(device, UR_DEVICE_INFO_USM_POOL_SUPPORT, + support); +} + ur_result_t GetDeviceUUID(ur_device_handle_t device, std::string &uuid) { return GetDeviceInfo(device, UR_DEVICE_INFO_UUID, uuid); } diff --git a/test/conformance/usm/urUSMDeviceAlloc.cpp b/test/conformance/usm/urUSMDeviceAlloc.cpp index cd48e73dbe..bfc48c2aa6 100644 --- a/test/conformance/usm/urUSMDeviceAlloc.cpp +++ b/test/conformance/usm/urUSMDeviceAlloc.cpp @@ -3,6 +3,7 @@ // See LICENSE.TXT // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include "helpers.h" +#include "uur/utils.h" #include struct urUSMDeviceAllocTest @@ -18,6 +19,11 @@ struct urUSMDeviceAllocTest } if (usePool) { + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ur_usm_pool_desc_t pool_desc = {}; ASSERT_SUCCESS(urUSMPoolCreate(context, &pool_desc, &pool)); } diff --git a/test/conformance/usm/urUSMHostAlloc.cpp b/test/conformance/usm/urUSMHostAlloc.cpp index ce11ddf3c1..f59af21897 100644 --- a/test/conformance/usm/urUSMHostAlloc.cpp +++ b/test/conformance/usm/urUSMHostAlloc.cpp @@ -19,6 +19,11 @@ struct urUSMHostAllocTest } if (usePool) { + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ur_usm_pool_desc_t pool_desc = {}; ASSERT_SUCCESS(urUSMPoolCreate(context, &pool_desc, &pool)); } diff --git a/test/conformance/usm/urUSMPoolCreate.cpp b/test/conformance/usm/urUSMPoolCreate.cpp index a723542026..ac40503eb0 100644 --- a/test/conformance/usm/urUSMPoolCreate.cpp +++ b/test/conformance/usm/urUSMPoolCreate.cpp @@ -3,9 +3,19 @@ // See LICENSE.TXT // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include "uur/utils.h" #include -using urUSMPoolCreateTest = uur::urContextTest; +struct urUSMPoolCreateTest : uur::urContextTest { + void SetUp() { + UUR_RETURN_ON_FATAL_FAILURE(uur::urContextTest::SetUp()); + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } + } +}; UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urUSMPoolCreateTest); TEST_P(urUSMPoolCreateTest, Success) { diff --git a/test/conformance/usm/urUSMSharedAlloc.cpp b/test/conformance/usm/urUSMSharedAlloc.cpp index e50bd8cfe7..e543602fbc 100644 --- a/test/conformance/usm/urUSMSharedAlloc.cpp +++ b/test/conformance/usm/urUSMSharedAlloc.cpp @@ -24,6 +24,11 @@ struct urUSMSharedAllocTest } if (usePool) { + ur_bool_t poolSupport = false; + ASSERT_SUCCESS(uur::GetDeviceUSMPoolSupport(device, poolSupport)); + if (!poolSupport) { + GTEST_SKIP() << "USM pools are not supported."; + } ur_usm_pool_desc_t pool_desc = {}; ASSERT_SUCCESS(urUSMPoolCreate(context, &pool_desc, &pool)); } diff --git a/test/conformance/usm/usm_adapter_native_cpu.match b/test/conformance/usm/usm_adapter_native_cpu.match index 84d214c97f..08a9c18cae 100644 --- a/test/conformance/usm/usm_adapter_native_cpu.match +++ b/test/conformance/usm/usm_adapter_native_cpu.match @@ -1,29 +1,7 @@ {{NONDETERMINISTIC}} -urUSMDeviceAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMDeviceAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMDeviceAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMDeviceAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMDeviceAllocTest.InvalidNullHandleContext/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMDeviceAllocTest.InvalidNullHandleDevice/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMDeviceAllocTest.InvalidNullPtrResult/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMDeviceAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMDeviceAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMDeviceAllocTest.InvalidValueAlignPowerOfTwo/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_2048 urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_8 urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_512 urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_2048 @@ -51,30 +29,9 @@ urUSMGetMemAllocInfoNegativeTest.InvalidNullHandleContext/SYCL_NATIVE_CPU___SYCL urUSMGetMemAllocInfoNegativeTest.InvalidNullPointerMem/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} urUSMGetMemAllocInfoNegativeTest.InvalidEnumeration/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} urUSMGetMemAllocInfoNegativeTest.InvalidValuePropSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMHostAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMHostAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMHostAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMHostAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMHostAllocTest.InvalidNullHandleContext/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMHostAllocTest.InvalidNullPtrMem/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMHostAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMHostAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMHostAllocTest.InvalidValueAlignPowerOfTwo/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_2048 urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_8 urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_512 urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_2048 @@ -90,47 +47,10 @@ urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Nat urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_64_8 urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_64_512 urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_64_2048 -urUSMPoolCreateTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolCreateTest.SuccessWithFlag/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTestWithInfoParam.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UR_USM_POOL_INFO_CONTEXT -urUSMPoolGetInfoTestWithInfoParam.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UR_USM_POOL_INFO_REFERENCE_COUNT -urUSMPoolGetInfoTest.InvalidNullHandlePool/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTest.InvalidEnumerationProperty/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTest.InvalidSizeZero/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTest.InvalidSizeTooSmall/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTest.InvalidNullPointerPropValue/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolGetInfoTest.InvalidNullPointerPropSizeRet/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolDestroyTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolDestroyTest.InvalidNullHandleContext/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolRetainTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMPoolRetainTest.InvalidNullHandlePool/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}} -urUSMSharedAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMSharedAllocTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMSharedAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMSharedAllocTest.SuccessWithDescriptors/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMSharedAllocTest.SuccessWithMultipleAdvices/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMSharedAllocTest.SuccessWithMultipleAdvices/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMSharedAllocTest.InvalidNullHandleContext/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMSharedAllocTest.InvalidNullHandleDevice/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMSharedAllocTest.InvalidNullPtrMem/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMSharedAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled urUSMSharedAllocTest.InvalidUSMSize/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled -urUSMSharedAllocTest.InvalidValueAlignPowerOfTwo/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_4_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_8_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_16_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_32_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolEnabled_64_2048 urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_8 urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_512 urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__UsePoolDisabled_4_2048 diff --git a/test/conformance/usm/usm_adapter_opencl.match b/test/conformance/usm/usm_adapter_opencl.match index fbaba92f30..3868e5be1b 100644 --- a/test/conformance/usm/usm_adapter_opencl.match +++ b/test/conformance/usm/usm_adapter_opencl.match @@ -1,86 +1,2 @@ {{NONDETERMINISTIC}} -urUSMDeviceAllocTest.Success/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.SuccessWithDescriptors/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.InvalidNullHandleContext/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.InvalidNullHandleDevice/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.InvalidNullPtrResult/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.InvalidUSMSize/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocTest.InvalidValueAlignPowerOfTwo/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_2048 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_8 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_512 -urUSMDeviceAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_2048 urUSMGetMemAllocInfoTest.Success/Intel_R__OpenCL___{{.*}}___UR_USM_ALLOC_INFO_POOL -urUSMHostAllocTest.Success/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocTest.SuccessWithDescriptors/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocTest.InvalidNullHandleContext/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocTest.InvalidNullPtrMem/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocTest.InvalidUSMSize/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocTest.InvalidValueAlignPowerOfTwo/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_2048 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_8 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_512 -urUSMHostAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_2048 -urUSMPoolCreateTest.Success/Intel_R__OpenCL___{{.*}} -urUSMPoolCreateTest.SuccessWithFlag/Intel_R__OpenCL___{{.*}} -urUSMPoolCreateTest.InvalidNullHandleContext/Intel_R__OpenCL___{{.*}} -urUSMPoolCreateTest.InvalidNullPointerPoolDesc/Intel_R__OpenCL___{{.*}} -urUSMPoolCreateTest.InvalidNullPointerPool/Intel_R__OpenCL___{{.*}} -urUSMPoolCreateTest.InvalidEnumerationFlags/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTestWithInfoParam.Success/Intel_R__OpenCL___{{.*}}___UR_USM_POOL_INFO_CONTEXT -urUSMPoolGetInfoTestWithInfoParam.Success/Intel_R__OpenCL___{{.*}}___UR_USM_POOL_INFO_REFERENCE_COUNT -urUSMPoolGetInfoTest.InvalidNullHandlePool/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTest.InvalidEnumerationProperty/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTest.InvalidSizeZero/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTest.InvalidSizeTooSmall/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTest.InvalidNullPointerPropValue/Intel_R__OpenCL___{{.*}} -urUSMPoolGetInfoTest.InvalidNullPointerPropSizeRet/Intel_R__OpenCL___{{.*}} -urUSMPoolDestroyTest.Success/Intel_R__OpenCL___{{.*}} -urUSMPoolDestroyTest.InvalidNullHandleContext/Intel_R__OpenCL___{{.*}} -urUSMPoolRetainTest.Success/Intel_R__OpenCL___{{.*}} -urUSMPoolRetainTest.InvalidNullHandlePool/Intel_R__OpenCL___{{.*}} -urUSMSharedAllocTest.Success/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.SuccessWithDescriptors/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.SuccessWithMultipleAdvices/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.InvalidNullHandleContext/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.InvalidNullHandleDevice/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.InvalidNullPtrMem/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.InvalidUSMSize/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocTest.InvalidValueAlignPowerOfTwo/Intel_R__OpenCL___{{.*}}___UsePoolEnabled -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_4_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_8_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_16_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_32_2048 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_8 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_512 -urUSMSharedAllocAlignmentTest.SuccessAlignedAllocations/Intel_R__OpenCL___{{.*}}___UsePoolEnabled_64_2048 diff --git a/tools/urinfo/urinfo.hpp b/tools/urinfo/urinfo.hpp index 59f4a8e5b2..0923642686 100644 --- a/tools/urinfo/urinfo.hpp +++ b/tools/urinfo/urinfo.hpp @@ -331,6 +331,8 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT); std::cout << prefix; + printDeviceInfo(hDevice, UR_DEVICE_INFO_USM_POOL_SUPPORT); + std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP); std::cout << prefix;