feature: report copy offload extension

Related-To: NEO-11376

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2024-06-18 13:04:32 +00:00 committed by Compute-Runtime-Automation
parent 7115c363c9
commit b28fc0f55d
3 changed files with 17 additions and 1 deletions

View File

@ -149,7 +149,7 @@ ze_result_t DriverHandleImp::getExtensionProperties(uint32_t *pCount,
for (const auto device : devices) {
if (device->getNEODevice()->getRootDeviceEnvironment().getBindlessHeapsHelper()) {
additionalExtensions.push_back({ZE_BINDLESS_IMAGE_EXP_NAME, ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT});
additionalExtensions.emplace_back(ZE_BINDLESS_IMAGE_EXP_NAME, ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT);
break;
}
}
@ -159,6 +159,10 @@ ze_result_t DriverHandleImp::getExtensionProperties(uint32_t *pCount,
additionalExtensions.emplace_back(ZE_SYNCHRONIZED_DISPATCH_EXP_NAME, ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT);
}
if (!devices[0]->getProductHelper().isDcFlushAllowed()) {
additionalExtensions.emplace_back(ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_NAME, ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_CURRENT);
}
auto extensionCount = static_cast<uint32_t>(this->extensionsSupported.size() + additionalExtensions.size());
if (nullptr == pExtensionProperties) {

View File

@ -122,6 +122,10 @@ TEST_F(DriverVersionTest, givenCallToGetExtensionPropertiesThenSupportedExtensio
additionalExtensions.emplace_back(ZE_SYNCHRONIZED_DISPATCH_EXP_NAME, ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT);
}
if (!device->getProductHelper().isDcFlushAllowed()) {
additionalExtensions.emplace_back(ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_NAME, ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_CURRENT);
}
uint32_t count = 0;
ze_result_t res = driverHandle->getExtensionProperties(&count, nullptr);
EXPECT_EQ(count, static_cast<uint32_t>(driverHandle->extensionsSupported.size() + additionalExtensions.size()));

View File

@ -177,6 +177,14 @@ typedef struct _zex_intel_queue_copy_operations_offload_hint_exp_desc_t {
#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES (ze_structure_type_t)0x00030019
///////////////////////////////////////////////////////////////////////////////
/// @brief Queue copy operations offload hint extension version(s)
typedef enum _zex_intel_queue_copy_operations_offload_hint_exp_version_t {
ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_1_0 = ZE_MAKE_VERSION(1, 0), ///< version 1.0
ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION(1, 0), ///< latest known version
ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff
} zex_intel_queue_copy_operations_offload_hint_exp_version_t;
#if defined(__cplusplus)
} // extern "C"
#endif