refactor: change type of stype member in L0 Core driver extensions

use uint32_t-alias type to avoid casting out of ze_structure_type_t enum range
Related-To: NEO-12901

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-04-18 12:54:27 +00:00
committed by Compute-Runtime-Automation
parent 95b685e46e
commit 0dd2535674
19 changed files with 113 additions and 109 deletions

View File

@@ -109,12 +109,12 @@ zexCounterBasedEventCreate(ze_context_handle_t hContext, ze_device_handle_t hDev
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES};
externalSyncAllocProperties.completionValue = completionValue;
externalSyncAllocProperties.deviceAddress = deviceAddress;
externalSyncAllocProperties.hostAddress = hostAddress;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = counterBasedFlags;
counterBasedDesc.signalScope = desc->signal;
counterBasedDesc.waitScope = desc->wait;

View File

@@ -369,13 +369,13 @@ QueueProperties CommandQueue::extractQueueProperties(const ze_command_queue_desc
auto baseProperties = static_cast<const ze_base_desc_t *>(desc.pNext);
while (baseProperties) {
if (baseProperties->stype == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
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;
} else if (auto syncDispatchMode = getSyncDispatchMode(baseProperties)) {
if (syncDispatchMode.has_value()) {
queueProperties.synchronizedDispatchMode = syncDispatchMode.value();
}
} else if (baseProperties->stype == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
} else if (static_cast<uint32_t>(baseProperties->stype) == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES) {
queueProperties.copyOffloadHint = static_cast<const zex_intel_queue_copy_operations_offload_hint_exp_desc_t *>(desc.pNext)->copyOffloadEnabled;
}

View File

@@ -924,7 +924,7 @@ ze_result_t DeviceImp::getKernelProperties(ze_device_module_properties_t *pKerne
if (compilerProductHelper.isDotProductAccumulateSystolicSupported(releaseHelper)) {
dpProperties->flags |= ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DPAS;
}
} else if (extendedProperties->stype == ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP) {
} else if (static_cast<uint32_t>(extendedProperties->stype) == ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP) {
zex_device_module_register_file_exp_t *properties = reinterpret_cast<zex_device_module_register_file_exp_t *>(extendedProperties);
const auto supportedNumGrfs = this->getProductHelper().getSupportedNumGrfs(this->getNEODevice()->getReleaseHelper());
@@ -1078,10 +1078,10 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
rtasProperties->rtasFormat = ZE_RTAS_FORMAT_EXP_INVALID;
}
}
} else if (extendedProperties->stype == ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC) {
} else if (static_cast<uint32_t>(extendedProperties->stype) == ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC) {
auto cmdListWaitOnMemDataSize = reinterpret_cast<ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t *>(extendedProperties);
cmdListWaitOnMemDataSize->cmdListWaitOnMemoryDataSizeInBytes = l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize();
} else if (extendedProperties->stype == ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES) {
} else if (static_cast<uint32_t>(extendedProperties->stype) == ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES) {
auto deviceMediaProperties = reinterpret_cast<ze_intel_device_media_exp_properties_t *>(extendedProperties);
deviceMediaProperties->numDecoderCores = 0;
deviceMediaProperties->numEncoderCores = 0;

View File

@@ -722,7 +722,7 @@ ze_result_t Event::enableExtensions(const EventDescriptor &eventDescriptor) {
auto extendedDesc = reinterpret_cast<const ze_base_desc_t *>(eventDescriptor.extensions);
while (extendedDesc) {
if (extendedDesc->stype == ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC) {
if (static_cast<uint32_t>(extendedDesc->stype) == ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC) {
auto eventSyncModeDesc = reinterpret_cast<const zex_intel_event_sync_mode_exp_desc_t *>(extendedDesc);
interruptMode = (eventSyncModeDesc->syncModeFlags & ZEX_INTEL_EVENT_SYNC_MODE_EXP_FLAG_SIGNAL_INTERRUPT);
@@ -733,7 +733,7 @@ ze_result_t Event::enableExtensions(const EventDescriptor &eventDescriptor) {
setExternalInterruptId(eventSyncModeDesc->externalInterruptId);
UNRECOVERABLE_IF(eventSyncModeDesc->externalInterruptId > 0 && eventDescriptor.eventPoolAllocation);
}
} else if (extendedDesc->stype == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES) {
} else if (static_cast<uint32_t>(extendedDesc->stype) == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES) {
auto externalSyncAllocProperties = reinterpret_cast<const zex_counter_based_event_external_sync_alloc_properties_t *>(extendedDesc);
if (!externalSyncAllocProperties->deviceAddress || !externalSyncAllocProperties->hostAddress) {
@@ -750,7 +750,7 @@ ze_result_t Event::enableExtensions(const EventDescriptor &eventDescriptor) {
auto inOrderExecInfo = NEO::InOrderExecInfo::createFromExternalAllocation(*device->getNEODevice(), deviceAlloc, castToUint64(externalSyncAllocProperties->deviceAddress),
hostAlloc, externalSyncAllocProperties->hostAddress, externalSyncAllocProperties->completionValue, 1, 1);
updateInOrderExecState(inOrderExecInfo, externalSyncAllocProperties->completionValue, 0);
} else if (extendedDesc->stype == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES) {
} else if (static_cast<uint32_t>(extendedDesc->stype) == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES) {
auto externalStorageProperties = reinterpret_cast<const zex_counter_based_event_external_storage_properties_t *>(extendedDesc);
auto deviceAlloc = getExternalCounterAllocationFromAddress(externalStorageProperties->deviceAddress);

View File

@@ -185,7 +185,7 @@ inline ze_result_t prepareL0StructuresLookupTable(StructuresLookupTable &lookupT
}
inline std::optional<NEO::SynchronizedDispatchMode> getSyncDispatchMode(const ze_base_desc_t *desc) {
if (desc->stype == ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
if (static_cast<uint32_t>(desc->stype) == ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC) {
auto syncDispatch = reinterpret_cast<const ze_synchronized_dispatch_exp_desc_t *>(desc);
return (syncDispatch->flags == ZE_SYNCHRONIZED_DISPATCH_ENABLED_EXP_FLAG ? NEO::SynchronizedDispatchMode::full : NEO::SynchronizedDispatchMode::limited);
}

View File

@@ -957,7 +957,7 @@ ze_result_t KernelImp::getProperties(ze_kernel_properties_t *pKernelProperties)
} else if (extendedProperties->stype == ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES) {
ze_kernel_max_group_size_properties_ext_t *properties = reinterpret_cast<ze_kernel_max_group_size_properties_ext_t *>(extendedProperties);
properties->maxGroupSize = maxKernelWorkGroupSize;
} else if (extendedProperties->stype == ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
} else if (static_cast<uint32_t>(extendedProperties->stype) == ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP) {
zex_kernel_register_file_size_exp_t *properties = reinterpret_cast<zex_kernel_register_file_size_exp_t *>(extendedProperties);
properties->registerFileSize = kernelDescriptor.kernelAttributes.numGrfRequired;
}

View File

@@ -89,12 +89,12 @@ struct InOrderCmdListFixture : public ::Test<ModuleFixture> {
DestroyableZeUniquePtr<InOrderFixtureMockEvent> createExternalSyncStorageEvent(uint64_t counterValue, uint64_t incrementValue, uint64_t *deviceAddress) {
ze_event_handle_t outEvent = nullptr;
zex_counter_based_event_external_storage_properties_t externalStorageAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_external_storage_properties_t externalStorageAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES};
externalStorageAllocProperties.completionValue = counterValue;
externalStorageAllocProperties.deviceAddress = deviceAddress;
externalStorageAllocProperties.incrementValue = incrementValue;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE | ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;
counterBasedDesc.pNext = &externalStorageAllocProperties;
@@ -369,4 +369,4 @@ struct MultiTileSynchronizedDispatchFixture : public MultiTileInOrderCmdListFixt
};
} // namespace ult
} // namespace L0
} // namespace L0

View File

@@ -2165,7 +2165,7 @@ TEST(CommandList, givenContextGroupEnabledWhenCreatingImmediateCommandListWithIn
}
zex_intel_queue_allocate_msix_hint_exp_desc_t allocateMsix = {};
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES;
allocateMsix.uniqueMsix = true;
ze_command_queue_desc_t desc = {};

View File

@@ -94,7 +94,7 @@ HWTEST_F(InOrderCmdListTests, givenEventSyncModeDescPassedWhenCreatingEventThenE
auto eventPool = std::unique_ptr<L0::EventPool>(EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, returnValue));
zex_intel_event_sync_mode_exp_desc_t syncModeDesc = {ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_intel_event_sync_mode_exp_desc_t syncModeDesc = {ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC};
ze_event_desc_t eventDesc = {};
eventDesc.pNext = &syncModeDesc;
@@ -1102,7 +1102,7 @@ HWTEST_F(InOrderCmdListTests, givenDependencyFromDifferentRootDeviceWhenAppendCa
auto ultCsr1 = static_cast<UltCommandStreamReceiver<FamilyType> *>(device1->getNEODevice()->getDefaultEngine().commandStreamReceiver);
ultCsr1->storeMakeResidentAllocations = true;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE;
ze_event_handle_t eventH = nullptr;
@@ -5363,12 +5363,12 @@ HWTEST_F(InOrderCmdListTests, givenCorrectInputParamsWhenCreatingCbEvent2ThenRet
*hostAddress = counterValue;
uint64_t *gpuAddress = ptrOffset(&counterValue, 64);
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES};
externalSyncAllocProperties.completionValue = counterValue;
externalSyncAllocProperties.deviceAddress = gpuAddress;
externalSyncAllocProperties.hostAddress = hostAddress;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE | ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;
counterBasedDesc.pNext = &externalSyncAllocProperties;
ze_event_handle_t handle = nullptr;
@@ -5428,12 +5428,12 @@ HWTEST_F(InOrderCmdListTests, givenUsmDeviceAllocationWhenCreatingCbEventFromExt
auto hostAddress = reinterpret_cast<uint64_t *>(allocHostMem(sizeof(uint64_t)));
auto deviceAddress = reinterpret_cast<uint64_t *>(allocDeviceMem(sizeof(uint64_t)));
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_external_sync_alloc_properties_t externalSyncAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES};
externalSyncAllocProperties.completionValue = 2;
externalSyncAllocProperties.deviceAddress = deviceAddress;
externalSyncAllocProperties.hostAddress = hostAddress;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE | ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;
counterBasedDesc.pNext = &externalSyncAllocProperties;
@@ -5461,12 +5461,12 @@ HWTEST_F(InOrderCmdListTests, givenExternalSyncStorageWhenCreatingCounterBasedEv
auto devAddress = reinterpret_cast<uint64_t *>(allocDeviceMem(sizeof(uint64_t) * 2));
zex_counter_based_event_external_storage_properties_t externalStorageAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_external_storage_properties_t externalStorageAllocProperties = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES};
externalStorageAllocProperties.completionValue = counterValue;
externalStorageAllocProperties.deviceAddress = nullptr;
externalStorageAllocProperties.incrementValue = incValue;
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE | ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;
counterBasedDesc.pNext = &externalStorageAllocProperties;
ze_event_handle_t handle = nullptr;
@@ -5761,7 +5761,7 @@ HWTEST_F(InOrderCmdListTests, givenExternalSyncStorageWhenCallingAppendSignalInO
}
HWTEST_F(InOrderCmdListTests, givenTimestmapEnabledWhenCreatingStandaloneCbEventThenSetCorrectPacketSize) {
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_KERNEL_TIMESTAMP;
ze_event_handle_t handle = nullptr;
@@ -5840,7 +5840,7 @@ HWTEST_F(InOrderCmdListTests, givenMitigateHostVisibleSignalWhenCallingSynchroni
HWTEST_F(InOrderCmdListTests, givenCounterBasedTimestampHostVisibleSignalWhenCallingSynchronizeOnCbEventThenFlushDcIfSupported) {
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_KERNEL_TIMESTAMP | ZEX_COUNTER_BASED_EVENT_FLAG_HOST_VISIBLE;
counterBasedDesc.signalScope = ZE_EVENT_SCOPE_FLAG_HOST;
@@ -5871,7 +5871,7 @@ HWTEST_F(InOrderCmdListTests, givenCounterBasedTimestampHostVisibleSignalWhenCal
}
HWTEST_F(InOrderCmdListTests, givenStandaloneCbEventWhenPassingExternalInterruptIdThenAssign) {
zex_intel_event_sync_mode_exp_desc_t syncModeDesc = {ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_intel_event_sync_mode_exp_desc_t syncModeDesc = {ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC};
syncModeDesc.externalInterruptId = 123;
syncModeDesc.syncModeFlags = ZEX_INTEL_EVENT_SYNC_MODE_EXP_FLAG_SIGNAL_INTERRUPT;

View File

@@ -150,7 +150,7 @@ HWTEST2_F(CopyOffloadInOrderTests, givenQueueDescriptorWhenCreatingCmdListThenEn
ze_command_list_handle_t cmdListHandle;
zex_intel_queue_copy_operations_offload_hint_exp_desc_t copyOffloadDesc = {ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_intel_queue_copy_operations_offload_hint_exp_desc_t copyOffloadDesc = {ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES};
copyOffloadDesc.copyOffloadEnabled = true;
ze_command_queue_desc_t cmdQueueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC};
@@ -1986,7 +1986,7 @@ HWTEST2_F(MultiTileSynchronizedDispatchTests, givenSyncDispatchExtensionWhenCrea
ze_base_desc_t unknownDesc = {ZE_STRUCTURE_TYPE_FORCE_UINT32};
ze_synchronized_dispatch_exp_desc_t syncDispatchDesc = {};
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC;
ze_command_list_desc_t cmdListDesc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC};
zex_command_list_handle_t hCmdList;
@@ -2052,7 +2052,7 @@ HWTEST2_F(MultiTileSynchronizedDispatchTests, givenSyncDispatchExtensionWhenCrea
ze_base_desc_t unknownDesc = {ZE_STRUCTURE_TYPE_FORCE_UINT32};
ze_synchronized_dispatch_exp_desc_t syncDispatchDesc = {};
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC;
ze_command_queue_desc_t queueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC};
zex_command_list_handle_t hCmdList;

View File

@@ -66,7 +66,7 @@ HWTEST2_F(InOrderIpcTests, givenInvalidCbEventWhenOpenIpcCalledThenReturnError,
HWTEST2_F(InOrderIpcTests, givenCbEventWhenCreatingFromApiThenOpenIpcHandle, MatchAny) {
auto immCmdList = createImmCmdList<FamilyType::gfxCoreFamily>();
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zex_counter_based_event_desc_t counterBasedDesc = {ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC};
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE;
ze_event_handle_t ipcEvent = nullptr;
ze_event_handle_t nonIpcEvent = nullptr;
@@ -319,4 +319,4 @@ HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError,
}
} // namespace ult
} // namespace L0
} // namespace L0

View File

@@ -1393,7 +1393,7 @@ TEST(CommandQueue, givenContextGroupEnabledWhenCreatingCommandQueuesWithInterrup
}
zex_intel_queue_allocate_msix_hint_exp_desc_t allocateMsix = {};
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES;
allocateMsix.uniqueMsix = true;
ze_command_queue_desc_t desc = {};

View File

@@ -6162,7 +6162,7 @@ TEST_F(DeviceTest, GivenValidDeviceWhenQueryingKernelTimestampsProptertiesThenCo
TEST_F(DeviceTest, givenDeviceWhenQueryingCmdListMemWaitOnMemDataSizeThenReturnValueFromHelper) {
ze_device_properties_t devProps;
ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t sizeProps = {ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t sizeProps = {ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC};
devProps.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
devProps.pNext = &sizeProps;
@@ -6175,7 +6175,7 @@ TEST_F(DeviceTest, givenDeviceWhenQueryingCmdListMemWaitOnMemDataSizeThenReturnV
TEST_F(DeviceTest, givenDeviceWhenQueryingMediaPropertiesThenReturnZero) {
ze_device_properties_t devProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_media_exp_properties_t mediaProps = {ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_media_exp_properties_t mediaProps = {ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES};
mediaProps.numDecoderCores = 123;
mediaProps.numEncoderCores = 456;
@@ -6395,7 +6395,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreFalseThenFlagsIndi
Mock2DTransposeDevice<false, false> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6410,7 +6410,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreFalseThenFlagsIndic
Mock2DTransposeDevice<true, false> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6425,7 +6425,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreTrueThenFlagsIndic
Mock2DTransposeDevice<false, true> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6440,7 +6440,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreTrueThenFlagsIndica
Mock2DTransposeDevice<true, true> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);

View File

@@ -45,11 +45,11 @@ typedef enum _ze_intel_device_block_array_exp_flag_t {
/// - This structure may be passed to ::zeDeviceGetProperties, via
/// `pNext` member of ::ze_device_properties_t.
/// @brief Device 2D block array properties
#define ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES (ze_structure_type_t)0x00030007
#define ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES (ze_structure_type_ext_t)0x00030007
typedef struct _ze_intel_device_block_array_exp_properties_t {
ze_structure_type_t stype = ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
ze_structure_type_ext_t stype = ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_block_array_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_block_array_exp_flag_t
} ze_intel_device_block_array_exp_properties_t;

View File

@@ -32,7 +32,7 @@ typedef enum _ze_intel_device_module_dp_exp_flag_t {
} ze_intel_device_module_dp_exp_flag_t;
///////////////////////////////////////////////////////////////////////////////
#define ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES (ze_structure_type_t)0x00030013
#define ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES (ze_structure_type_ext_t)0x00030013
///////////////////////////////////////////////////////////////////////////////
/// @brief Device Module dot product properties queried using
/// ::zeDeviceGetModuleProperties
@@ -42,10 +42,10 @@ typedef enum _ze_intel_device_module_dp_exp_flag_t {
/// `pNext` member of ::ze_device_module_properties_t.
/// @brief Device module dot product properties
typedef struct _ze_intel_device_module_dp_exp_properties_t {
ze_structure_type_t stype = ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_module_dp_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_module_dp_flag_t
ze_structure_type_ext_t stype = ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_module_dp_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_module_dp_flag_t
} ze_intel_device_module_dp_exp_properties_t;
```

View File

@@ -10,6 +10,7 @@
#if defined(__cplusplus)
#pragma once
#endif
#include "level_zero/ze_stypes.h"
#include <level_zero/ze_api.h>
#if defined(__cplusplus)
@@ -87,7 +88,7 @@ typedef struct _ze_synchronized_dispatch_exp_desc_t ze_synchronized_dispatch_exp
/// @brief Command queue or command list descriptor for synchronized dispatch. This structure may be
/// passed as pNext member of ::ze_command_queue_desc_t. or ::ze_command_list_desc_t.
typedef struct _ze_synchronized_dispatch_exp_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_synchronized_dispatch_exp_flags_t flags; ///< [in] mode flags.
@@ -102,7 +103,7 @@ typedef struct _ze_intel_media_communication_desc_t ze_intel_media_communication
///////////////////////////////////////////////////////////////////////////////
/// @brief ze_intel_media_communication_desc_t
typedef struct _ze_intel_media_communication_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific, this will be used to extend this in future
void *controlSharedMemoryBuffer; ///< [in] control shared memory buffer pointer, must be USM address
uint32_t controlSharedMemoryBufferSize; ///< [in] control shared memory buffer size
@@ -118,9 +119,9 @@ typedef struct _ze_intel_media_doorbell_handle_desc_t ze_intel_media_doorbell_ha
/// @brief ze_intel_media_doorbell_handle_desc_t
/// @details Handle of the doorbell. This structure is passed as argument of zeIntelMediaCommunicationCreate and zeIntelMediaCommunicationDestroy
typedef struct _ze_intel_media_doorbell_handle_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific, this will be used to extend this in future
void *doorbell; ///< [in,out] handle of the doorbell
ze_structure_type_ext_t stype; ///< [in] type of this structure
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific, this will be used to extend this in future
void *doorbell; ///< [in,out] handle of the doorbell
} ze_intel_media_doorbell_handle_desc_t;
///////////////////////////////////////////////////////////////////////////////
@@ -139,7 +140,7 @@ typedef struct _ze_intel_device_media_exp_properties_t ze_intel_device_media_exp
///////////////////////////////////////////////////////////////////////////////
/// @brief May be passed to ze_device_properties_t through pNext.
typedef struct _ze_intel_device_media_exp_properties_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
ze_intel_device_media_exp_flags_t flags; ///< [out] device media flags
uint32_t numEncoderCores; ///< [out] number of encoder cores
@@ -182,7 +183,7 @@ typedef enum _zex_counter_based_event_exp_flag_t {
} zex_counter_based_event_exp_flag_t;
typedef struct _zex_counter_based_event_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
zex_counter_based_event_exp_flags_t flags; ///< [in] counter based event flags.
///< Must be 0 (default) or a valid combination of ::zex_counter_based_event_exp_flag_t
@@ -202,22 +203,22 @@ typedef struct _zex_counter_based_event_desc_t {
/// @brief Initial Counter Based Event synchronization parameters. This structure may be
/// passed as pNext member of ::zex_counter_based_event_desc_t.
typedef struct _zex_counter_based_event_external_sync_alloc_properties_t {
ze_structure_type_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
uint64_t *deviceAddress; ///< [in] device address for external synchronization allocation
uint64_t *hostAddress; ///< [in] host address for external synchronization allocation
uint64_t completionValue; ///< [in] completion value for external synchronization allocation
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
uint64_t *deviceAddress; ///< [in] device address for external synchronization allocation
uint64_t *hostAddress; ///< [in] host address for external synchronization allocation
uint64_t completionValue; ///< [in] completion value for external synchronization allocation
} zex_counter_based_event_external_sync_alloc_properties_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Initial Counter Based Event synchronization parameters. This structure may be
/// passed as pNext member of ::zex_counter_based_event_desc_t.
typedef struct _zex_counter_based_event_external_storage_properties_t {
ze_structure_type_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
uint64_t *deviceAddress; ///< [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory
uint64_t incrementValue; ///< [in] value which would by atomically added upon each completion
uint64_t completionValue; ///< [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
uint64_t *deviceAddress; ///< [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory
uint64_t incrementValue; ///< [in] value which would by atomically added upon each completion
uint64_t completionValue; ///< [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed
} zex_counter_based_event_external_storage_properties_t;
#if defined(__cplusplus)

View File

@@ -37,19 +37,19 @@ zexKernelGetArgumentType(
/// @brief General Register File descriptor.
/// Must be passed to zeDeviceGetModuleProperties via pNext member of ze_device_module_properties_t.
typedef struct _zex_device_module_register_file_exp_t {
ze_structure_type_t stype = ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP; ///< [in] type of this structure
const void *pNext = nullptr; ///< [in, out][optional] pointer to extension-specific structure
uint32_t registerFileSizesCount; ///< [out] Size of array of supported GRF sizes
uint32_t *registerFileSizes = nullptr; ///< [in, out][optional] Array of supported GRF sizes
ze_structure_type_ext_t stype = ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP; ///< [in] type of this structure
const void *pNext = nullptr; ///< [in, out][optional] pointer to extension-specific structure
uint32_t registerFileSizesCount; ///< [out] Size of array of supported GRF sizes
uint32_t *registerFileSizes = nullptr; ///< [in, out][optional] Array of supported GRF sizes
} zex_device_module_register_file_exp_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Kernel register file size information
/// Must be passed to zeKernelGetProperties via pNext member of ze_kernel_properties_t
typedef struct _zex_kernel_register_file_size_exp_t {
ze_structure_type_t stype = ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP; ///< [in] type of this structure
const void *pNext = nullptr; ///< [in, out][optional] pointer to extension-specific structure
uint32_t registerFileSize; ///< [out] Register file size used in kernel
ze_structure_type_ext_t stype = ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP; ///< [in] type of this structure
const void *pNext = nullptr; ///< [in, out][optional] pointer to extension-specific structure
uint32_t registerFileSize; ///< [out] Register file size used in kernel
} zex_kernel_register_file_size_exp_t;
#endif // _ZEX_MODULE_H

View File

@@ -56,10 +56,10 @@ typedef enum _ze_intel_device_module_dp_exp_flag_t {
/// `pNext` member of ::ze_device_module_properties_t.
/// @brief Device module dot product properties
typedef struct _ze_intel_device_module_dp_exp_properties_t {
ze_structure_type_t stype = ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_module_dp_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_module_dp_flag_t
ze_structure_type_ext_t stype = ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_module_dp_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_module_dp_flag_t
} ze_intel_device_module_dp_exp_properties_t;
#ifndef ZE_INTEL_COMMAND_LIST_MEMORY_SYNC
@@ -86,7 +86,7 @@ typedef enum _ze_intel_command_list_memory_sync_exp_version_t {
/// - Implementation must support ::ZE_intel_experimental_command_list_memory_sync extension
/// - May be passed to ze_device_properties_t through pNext.
typedef struct _ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
uint32_t cmdListWaitOnMemoryDataSizeInBytes; /// <out> Defines supported data size for zexCommandListAppendWaitOnMemory[64] API
@@ -123,7 +123,7 @@ typedef enum _zex_intel_event_sync_mode_exp_flag_t {
/// - Implementation must support ::ZEX_intel_experimental_event_sync_mode extension
/// - May be passed to ze_event_desc_t through pNext.
typedef struct _zex_intel_event_sync_mode_exp_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
zex_intel_event_sync_mode_exp_flags_t syncModeFlags; /// <in> valid combination of ::ze_intel_event_sync_mode_exp_flag_t
@@ -139,12 +139,12 @@ typedef struct _zex_intel_queue_allocate_msix_hint_exp_desc_t zex_intel_queue_al
/// passed as pNext member of ::ze_command_queue_desc_t.
typedef struct _zex_intel_queue_allocate_msix_hint_exp_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_bool_t uniqueMsix; ///< [in] If set, try to allocate unique msix for command queue.
///< If not set, driver will follow default behaviour. It may share msix for signaling completion with other queues.
///< Number of unique msixes may be limited. On unsuccessful allocation, queue or immediate cmd list creation API fallbacks to default behaviour.
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_bool_t uniqueMsix; ///< [in] If set, try to allocate unique msix for command queue.
///< If not set, driver will follow default behaviour. It may share msix for signaling completion with other queues.
///< Number of unique msixes may be limited. On unsuccessful allocation, queue or immediate cmd list creation API fallbacks to default behaviour.
} zex_intel_queue_allocate_msix_hint_exp_desc_t;
@@ -153,12 +153,12 @@ typedef struct _zex_intel_queue_allocate_msix_hint_exp_desc_t {
/// passed as pNext member of ::ze_command_queue_desc_t.
typedef struct _zex_intel_queue_copy_operations_offload_hint_exp_desc_t {
ze_structure_type_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_bool_t copyOffloadEnabled; ///< [in] If set, try to offload copy operations to different engines. Applicable only for compute queues.
///< This is only a hint. Driver may ignore it per append call, based on platform capabilities or internal heuristics.
///< If not set, driver will follow default behaviour. Copy operations will be submitted to same engine as compute operations.
ze_structure_type_ext_t stype; ///< [in] type of this structure
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_bool_t copyOffloadEnabled; ///< [in] If set, try to offload copy operations to different engines. Applicable only for compute queues.
///< This is only a hint. Driver may ignore it per append call, based on platform capabilities or internal heuristics.
///< If not set, driver will follow default behaviour. Copy operations will be submitted to same engine as compute operations.
} zex_intel_queue_copy_operations_offload_hint_exp_desc_t;
@@ -213,10 +213,10 @@ typedef enum _ze_intel_device_block_array_exp_flag_t {
/// @brief Device 2D block array properties
typedef struct _ze_intel_device_block_array_exp_properties_t {
ze_structure_type_t stype = ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_block_array_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_block_array_exp_flag_t
ze_structure_type_ext_t stype = ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES; ///< [in] type of this structure
void *pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
ze_intel_device_block_array_exp_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_intel_device_block_array_exp_flag_t
} ze_intel_device_block_array_exp_properties_t;
///////////////////////////////////////////////////////////////////////////////

View File

@@ -11,22 +11,25 @@
#include <level_zero/ze_api.h>
#include <level_zero/zet_api.h>
#define ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC (ze_structure_type_t)0x00020020
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC (ze_structure_type_t)0x00020021
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_DOORBELL_HANDLE_DESC (ze_structure_type_t)0x00020022
#define ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES (ze_structure_type_t)0x00020023
#define ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES (ze_structure_type_t)0x00030007
#define ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP (ze_structure_type_t)0x00030010
#define ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP (ze_structure_type_t)0x00030012
#define ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES (ze_structure_type_t)0x00030013
#define ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC (ze_structure_type_t)0x00030016
#define ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC (ze_structure_type_t)0x00030017
#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES (ze_structure_type_t)0x00030018
#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES (ze_structure_type_t)0x0003001B
#define ZE_STRUCTURE_INTEL_DEVICE_MEMORY_CXL_EXP_PROPERTIES (ze_structure_type_t)0x00030019
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC (ze_structure_type_t)0x0003001C
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES (ze_structure_type_t)0x0003001D
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES (ze_structure_type_t)0x00030027
#include <cstdint>
using ze_structure_type_ext_t = uint32_t;
#define ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC static_cast<ze_structure_type_ext_t>(0x00020020)
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC static_cast<ze_structure_type_ext_t>(0x00020021)
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_DOORBELL_HANDLE_DESC static_cast<ze_structure_type_ext_t>(0x00020022)
#define ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00020023)
#define ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030007)
#define ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP static_cast<ze_structure_type_ext_t>(0x00030010)
#define ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP static_cast<ze_structure_type_ext_t>(0x00030012)
#define ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030013)
#define ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC static_cast<ze_structure_type_ext_t>(0x00030016)
#define ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC static_cast<ze_structure_type_ext_t>(0x00030017)
#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030018)
#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x0003001B)
#define ZE_STRUCTURE_INTEL_DEVICE_MEMORY_CXL_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030019)
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC static_cast<ze_structure_type_ext_t>(0x0003001C)
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES static_cast<ze_structure_type_ext_t>(0x0003001D)
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030027)
// Metric structure types
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP (zet_structure_type_t)0x0001000a // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901