diff --git a/level_zero/api/driver_experimental/public/zex_event.cpp b/level_zero/api/driver_experimental/public/zex_event.cpp index e03e9f8be8..b0430af263 100644 --- a/level_zero/api/driver_experimental/public/zex_event.cpp +++ b/level_zero/api/driver_experimental/public/zex_event.cpp @@ -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; diff --git a/level_zero/core/source/cmdqueue/cmdqueue.cpp b/level_zero/core/source/cmdqueue/cmdqueue.cpp index bed478f8b3..9ec4a3b252 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue.cpp +++ b/level_zero/core/source/cmdqueue/cmdqueue.cpp @@ -369,13 +369,13 @@ QueueProperties CommandQueue::extractQueueProperties(const ze_command_queue_desc auto baseProperties = static_cast(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(baseProperties->stype) == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES) { queueProperties.interruptHint = static_cast(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(baseProperties->stype) == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES) { queueProperties.copyOffloadHint = static_cast(desc.pNext)->copyOffloadEnabled; } diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index 29a0f938ba..ae528f37ca 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -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(extendedProperties->stype) == ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP) { zex_device_module_register_file_exp_t *properties = reinterpret_cast(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(extendedProperties->stype) == ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC) { auto cmdListWaitOnMemDataSize = reinterpret_cast(extendedProperties); cmdListWaitOnMemDataSize->cmdListWaitOnMemoryDataSizeInBytes = l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize(); - } else if (extendedProperties->stype == ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES) { + } else if (static_cast(extendedProperties->stype) == ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES) { auto deviceMediaProperties = reinterpret_cast(extendedProperties); deviceMediaProperties->numDecoderCores = 0; deviceMediaProperties->numEncoderCores = 0; diff --git a/level_zero/core/source/event/event.cpp b/level_zero/core/source/event/event.cpp index e85ca2683c..f69a0fa23e 100644 --- a/level_zero/core/source/event/event.cpp +++ b/level_zero/core/source/event/event.cpp @@ -722,7 +722,7 @@ ze_result_t Event::enableExtensions(const EventDescriptor &eventDescriptor) { auto extendedDesc = reinterpret_cast(eventDescriptor.extensions); while (extendedDesc) { - if (extendedDesc->stype == ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC) { + if (static_cast(extendedDesc->stype) == ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC) { auto eventSyncModeDesc = reinterpret_cast(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(extendedDesc->stype) == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES) { auto externalSyncAllocProperties = reinterpret_cast(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(extendedDesc->stype) == ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES) { auto externalStorageProperties = reinterpret_cast(extendedDesc); auto deviceAlloc = getExternalCounterAllocationFromAddress(externalStorageProperties->deviceAddress); diff --git a/level_zero/core/source/helpers/properties_parser.h b/level_zero/core/source/helpers/properties_parser.h index 2100d36f21..bd25be7b40 100644 --- a/level_zero/core/source/helpers/properties_parser.h +++ b/level_zero/core/source/helpers/properties_parser.h @@ -185,7 +185,7 @@ inline ze_result_t prepareL0StructuresLookupTable(StructuresLookupTable &lookupT } inline std::optional 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(desc->stype) == ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC) { auto syncDispatch = reinterpret_cast(desc); return (syncDispatch->flags == ZE_SYNCHRONIZED_DISPATCH_ENABLED_EXP_FLAG ? NEO::SynchronizedDispatchMode::full : NEO::SynchronizedDispatchMode::limited); } diff --git a/level_zero/core/source/kernel/kernel_imp.cpp b/level_zero/core/source/kernel/kernel_imp.cpp index 34c15ce844..f4e7f82f8f 100644 --- a/level_zero/core/source/kernel/kernel_imp.cpp +++ b/level_zero/core/source/kernel/kernel_imp.cpp @@ -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(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(extendedProperties->stype) == ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP) { zex_kernel_register_file_size_exp_t *properties = reinterpret_cast(extendedProperties); properties->registerFileSize = kernelDescriptor.kernelAttributes.numGrfRequired; } diff --git a/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h b/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h index f327ae5610..5ff9219c07 100644 --- a/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h @@ -89,12 +89,12 @@ struct InOrderCmdListFixture : public ::Test { DestroyableZeUniquePtr 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 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp index e1433abe94..8c1fa44cad 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp @@ -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 = {}; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp index aef54c74d4..5c5cef5c06 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp @@ -94,7 +94,7 @@ HWTEST_F(InOrderCmdListTests, givenEventSyncModeDescPassedWhenCreatingEventThenE auto eventPool = std::unique_ptr(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 *>(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(allocHostMem(sizeof(uint64_t))); auto deviceAddress = reinterpret_cast(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(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 *>(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; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp index d747076044..921f8b0870 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp @@ -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; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_3.cpp index 8c6a266e6d..d64528d030 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_3.cpp @@ -66,7 +66,7 @@ HWTEST2_F(InOrderIpcTests, givenInvalidCbEventWhenOpenIpcCalledThenReturnError, HWTEST2_F(InOrderIpcTests, givenCbEventWhenCreatingFromApiThenOpenIpcHandle, MatchAny) { auto immCmdList = createImmCmdList(); - 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 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp index 1bf892762e..c43c2d071c 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp @@ -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 = {}; diff --git a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp index a5950d5db0..fccdc0bb51 100644 --- a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp +++ b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp @@ -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 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(&deviceImp))->getProperties(&deviceProps); @@ -6410,7 +6410,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreFalseThenFlagsIndic Mock2DTransposeDevice 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(&deviceImp))->getProperties(&deviceProps); @@ -6425,7 +6425,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreTrueThenFlagsIndic Mock2DTransposeDevice 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(&deviceImp))->getProperties(&deviceProps); @@ -6440,7 +6440,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreTrueThenFlagsIndica Mock2DTransposeDevice 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(&deviceImp))->getProperties(&deviceProps); diff --git a/level_zero/doc/experimental_extensions/2D_BLOCK_TRANSPOSE.md b/level_zero/doc/experimental_extensions/2D_BLOCK_TRANSPOSE.md index f602ce4b20..d041a0a32f 100644 --- a/level_zero/doc/experimental_extensions/2D_BLOCK_TRANSPOSE.md +++ b/level_zero/doc/experimental_extensions/2D_BLOCK_TRANSPOSE.md @@ -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; diff --git a/level_zero/doc/experimental_extensions/MODULE_DP_SUPPORT.md b/level_zero/doc/experimental_extensions/MODULE_DP_SUPPORT.md index d2ade30734..1a88ba3ca6 100644 --- a/level_zero/doc/experimental_extensions/MODULE_DP_SUPPORT.md +++ b/level_zero/doc/experimental_extensions/MODULE_DP_SUPPORT.md @@ -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; ``` diff --git a/level_zero/include/level_zero/driver_experimental/zex_common.h b/level_zero/include/level_zero/driver_experimental/zex_common.h index ecb8f0e47b..5af6e5119a 100644 --- a/level_zero/include/level_zero/driver_experimental/zex_common.h +++ b/level_zero/include/level_zero/driver_experimental/zex_common.h @@ -10,6 +10,7 @@ #if defined(__cplusplus) #pragma once #endif +#include "level_zero/ze_stypes.h" #include #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) diff --git a/level_zero/include/level_zero/driver_experimental/zex_module.h b/level_zero/include/level_zero/driver_experimental/zex_module.h index 74e4bf5283..764d0e1fce 100644 --- a/level_zero/include/level_zero/driver_experimental/zex_module.h +++ b/level_zero/include/level_zero/driver_experimental/zex_module.h @@ -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 diff --git a/level_zero/include/level_zero/ze_intel_gpu.h b/level_zero/include/level_zero/ze_intel_gpu.h index 4fd60d6427..5dae243d0d 100644 --- a/level_zero/include/level_zero/ze_intel_gpu.h +++ b/level_zero/include/level_zero/ze_intel_gpu.h @@ -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; /// 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; /// 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; /////////////////////////////////////////////////////////////////////////////// diff --git a/level_zero/include/level_zero/ze_stypes.h b/level_zero/include/level_zero/ze_stypes.h index fae3fd1600..c8ee24b855 100644 --- a/level_zero/include/level_zero/ze_stypes.h +++ b/level_zero/include/level_zero/ze_stypes.h @@ -11,22 +11,25 @@ #include #include -#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 +using ze_structure_type_ext_t = uint32_t; + +#define ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC static_cast(0x00020020) +#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC static_cast(0x00020021) +#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_DOORBELL_HANDLE_DESC static_cast(0x00020022) +#define ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES static_cast(0x00020023) +#define ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES static_cast(0x00030007) +#define ZEX_STRUCTURE_DEVICE_MODULE_REGISTER_FILE_EXP static_cast(0x00030010) +#define ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP static_cast(0x00030012) +#define ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES static_cast(0x00030013) +#define ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC static_cast(0x00030016) +#define ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC static_cast(0x00030017) +#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES static_cast(0x00030018) +#define ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES static_cast(0x0003001B) +#define ZE_STRUCTURE_INTEL_DEVICE_MEMORY_CXL_EXP_PROPERTIES static_cast(0x00030019) +#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC static_cast(0x0003001C) +#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_SYNC_ALLOC_PROPERTIES static_cast(0x0003001D) +#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES static_cast(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