feature: add command queue flag to pass copy offload hint

Related-To: NEO-14560
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-07-11 14:03:26 +00:00
committed by Compute-Runtime-Automation
parent 645de5add8
commit 762b04cf77
4 changed files with 52 additions and 7 deletions

View File

@@ -368,6 +368,10 @@ QueueProperties CommandQueue::extractQueueProperties(const ze_command_queue_desc
auto baseProperties = static_cast<const ze_base_desc_t *>(desc.pNext);
if ((desc.flags & ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT) == ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT) {
queueProperties.copyOffloadHint = true;
}
while (baseProperties) {
if (static_cast<uint32_t>(baseProperties->stype) == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES) {
queueProperties.interruptHint = static_cast<const zex_intel_queue_allocate_msix_hint_exp_desc_t *>(desc.pNext)->uniqueMsix;

View File

@@ -18,17 +18,12 @@ const ze_context_desc_t contextDesc{
.flags = static_cast<ze_context_flags_t>(0),
};
static const zex_intel_queue_copy_operations_offload_hint_exp_desc_t copyOffloadHint = {
.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES,
.pNext = nullptr,
.copyOffloadEnabled = true};
const ze_command_queue_desc_t commandQueueDesc = {
.stype = ze_structure_type_t::ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC,
.pNext = &copyOffloadHint,
.pNext = nullptr,
.ordinal = 0,
.index = 0,
.flags = static_cast<ze_command_queue_flags_t>(ZE_COMMAND_QUEUE_FLAG_IN_ORDER),
.flags = static_cast<ze_command_queue_flags_t>(ZE_COMMAND_QUEUE_FLAG_IN_ORDER | ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT),
.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS,
.priority = ZE_COMMAND_QUEUE_PRIORITY_NORMAL,
};