refactor: add NOLINT for pending problems

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2024-10-10 10:46:04 +00:00
committed by Compute-Runtime-Automation
parent d433fd585a
commit 00aedcaed4
30 changed files with 47 additions and 47 deletions

View File

@@ -368,13 +368,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) {
if (baseProperties->stype == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
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) {
} else if (baseProperties->stype == ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
queueProperties.copyOffloadHint = static_cast<const zex_intel_queue_copy_operations_offload_hint_exp_desc_t *>(desc.pNext)->copyOffloadEnabled;
}

View File

@@ -184,7 +184,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) {
if (desc->stype == ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
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

@@ -948,7 +948,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) {
} else if (extendedProperties->stype == ZEX_STRUCTURE_KERNEL_REGISTER_FILE_SIZE_EXP) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
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

@@ -30,7 +30,7 @@ int main(int argc, char *argv[]) {
// Gather Dot Product (DP) support from driver
ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
deviceModProps.pNext = &moduleDpProps;
SUCCESS_OR_TERMINATE(zeDeviceGetModuleProperties(device, &deviceModProps));

View File

@@ -31,7 +31,7 @@ HWTEST2_F(DeviceFixtureGen12LP, GivenTargetGen12LPaWhenGettingMemoryPropertiesTh
HWTEST2_F(DeviceFixtureGen12LP, GivenTargetGen12LPWhenGettingDpSupportThenReturnsTrue, IsXeLpg) {
ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
moduleDpProps.flags = 0u;
deviceModProps.pNext = &moduleDpProps;

View File

@@ -2157,7 +2157,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;
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
allocateMsix.uniqueMsix = true;
ze_command_queue_desc_t desc = {};

View File

@@ -87,7 +87,7 @@ HWTEST2_F(InOrderCmdListTests, givenEventSyncModeDescPassedWhenCreatingEventThen
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};
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
ze_event_desc_t eventDesc = {};
eventDesc.pNext = &syncModeDesc;
@@ -4509,7 +4509,7 @@ HWTEST2_F(InOrderCmdListTests, givenStandaloneEventWhenCallingSynchronizeThenRet
}
HWTEST2_F(InOrderCmdListTests, givenStandaloneCbEventWhenPassingExternalInterruptIdThenAssign, MatchAny) {
zex_intel_event_sync_mode_exp_desc_t syncModeDesc = {ZEX_INTEL_STRUCTURE_TYPE_EVENT_SYNC_MODE_EXP_DESC};
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
syncModeDesc.externalInterruptId = 123;
ze_event_desc_t eventDesc = {};

View File

@@ -134,7 +134,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};
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
copyOffloadDesc.copyOffloadEnabled = true;
ze_command_queue_desc_t cmdQueueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC};
@@ -1811,7 +1811,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;
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_command_list_desc_t cmdListDesc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC};
zex_command_list_handle_t hCmdList;
@@ -1877,7 +1877,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;
syncDispatchDesc.stype = ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ze_command_queue_desc_t queueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC};
zex_command_list_handle_t hCmdList;

View File

@@ -1343,7 +1343,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;
allocateMsix.stype = ZEX_INTEL_STRUCTURE_TYPE_QUEUE_ALLOCATE_MSIX_HINT_EXP_PROPERTIES; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
allocateMsix.uniqueMsix = true;
ze_command_queue_desc_t desc = {};

View File

@@ -1617,7 +1617,7 @@ TEST_F(DeviceTest, whenGetDevicePropertiesCalledThenCorrectDevicePropertyEccFlag
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
device->getProperties(&deviceProps);
auto expected = (this->neoDevice->getDeviceInfo().errorCorrectionSupport) ? ZE_DEVICE_PROPERTY_FLAG_ECC : static_cast<ze_device_property_flag_t>(0u);
auto expected = (this->neoDevice->getDeviceInfo().errorCorrectionSupport) ? ZE_DEVICE_PROPERTY_FLAG_ECC : static_cast<ze_device_property_flag_t>(0u); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
EXPECT_EQ(expected, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ECC);
}
@@ -6024,7 +6024,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};
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
devProps.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
devProps.pNext = &sizeProps;
@@ -6037,7 +6037,7 @@ TEST_F(DeviceTest, givenDeviceWhenQueryingCmdListMemWaitOnMemDataSizeThenReturnV
TEST_F(DeviceTest, givenDeviecWhenQueryingMediaPropertiesThenReturnZero) {
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};
ze_intel_device_media_exp_properties_t mediaProps = {ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
mediaProps.numDecoderCores = 123;
mediaProps.numEncoderCores = 456;
@@ -6257,7 +6257,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};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6272,7 +6272,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};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6287,7 +6287,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};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);
@@ -6302,7 +6302,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};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
deviceProps.pNext = &blockArrayProps;
auto success = L0::Device::fromHandle(static_cast<ze_device_handle_t>(&deviceImp))->getProperties(&deviceProps);

View File

@@ -1378,7 +1378,7 @@ HWTEST2_F(ImageCreate, WhenImageIsCreatedThenDescMatchesSurfaceFormats, IsAtMost
// Some formats aren't compilable on all generations, so for those we
// skip the format check and rely on gen-specific tests defined elsewhere.
static const typename RENDER_SURFACE_STATE::SURFACE_FORMAT noFormatCheck =
static_cast<typename RENDER_SURFACE_STATE::SURFACE_FORMAT>(0xffff);
static_cast<typename RENDER_SURFACE_STATE::SURFACE_FORMAT>(0xffff); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
struct FormatInfo {
size_t elemBitSize;

View File

@@ -34,7 +34,7 @@ HWTEST2_F(DeviceXe2HpgCoreTest, whenCallingGetMemoryPropertiesWithNonNullPtrThen
HWTEST2_F(DeviceXe2HpgCoreTest, GivenTargetXeHpgCoreWhenGettingDpSupportThenReturnsTrue, IsXe2HpgCore) {
ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
moduleDpProps.flags = 0u;
deviceModProps.pNext = &moduleDpProps;

View File

@@ -94,7 +94,7 @@ HWTEST2_F(DeviceTestXeHpc, givenXeHpcBStepWhenCreatingMultiTileDeviceThenExpectI
HWTEST2_F(DeviceTestXeHpc, GivenTargetXeHPCWhenGettingDpSupportThenReturnsTrue, IsXeHpcCore) {
ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES}; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
moduleDpProps.flags = 0u;
deviceModProps.pNext = &moduleDpProps;

View File

@@ -222,7 +222,7 @@ ze_result_t IpSamplingMetricSourceImp::handleMetricGroupExtendedProperties(zet_m
retVal = ZE_RESULT_SUCCESS;
}
if (extendedProperties->stype == ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP) {
if (extendedProperties->stype == ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zet_intel_metric_group_type_exp_t *groupType = reinterpret_cast<zet_intel_metric_group_type_exp_t *>(extendedProperties);
groupType->type = ZET_INTEL_METRIC_GROUP_TYPE_EXP_OTHER;
retVal = ZE_RESULT_SUCCESS;

View File

@@ -225,7 +225,7 @@ ze_result_t OaMetricSourceImp::handleMetricGroupExtendedProperties(zet_metric_gr
}
}
if (extendedProperties->stype == ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP) {
if (extendedProperties->stype == ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP) { // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zet_intel_metric_group_type_exp_t *groupType = reinterpret_cast<zet_intel_metric_group_type_exp_t *>(extendedProperties);
groupType->type = ZET_INTEL_METRIC_GROUP_TYPE_EXP_OTHER;
retVal = ZE_RESULT_SUCCESS;

View File

@@ -302,9 +302,9 @@ HWTEST2_F(MetricIpSamplingEnumerationTest, GivenEnumerationIsSuccessfulWhenQuery
ASSERT_NE(metricGroups[0], nullptr);
zet_intel_metric_group_type_exp_t metricGroupType{};
metricGroupType.stype = ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP;
metricGroupType.stype = ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
metricGroupType.pNext = nullptr;
metricGroupType.type = static_cast<zet_intel_metric_group_type_exp_flags_t>(0xffffffff);
metricGroupType.type = static_cast<zet_intel_metric_group_type_exp_flags_t>(0xffffffff); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
zet_metric_group_properties_t metricGroupProperties = {ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES, &metricGroupType};
EXPECT_EQ(zetMetricGroupGetProperties(metricGroups[0], &metricGroupProperties), ZE_RESULT_SUCCESS);

View File

@@ -3348,9 +3348,9 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetGetMetricGroupProperties
EXPECT_NE(metricGroupHandle, nullptr);
zet_intel_metric_group_type_exp_t metricGroupType{};
metricGroupType.stype = ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP;
metricGroupType.stype = ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP; // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
metricGroupType.pNext = nullptr;
metricGroupType.type = static_cast<zet_intel_metric_group_type_exp_flags_t>(0xffffffff);
metricGroupType.type = static_cast<zet_intel_metric_group_type_exp_flags_t>(0xffffffff); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
metricGroupProperties.pNext = &metricGroupType;

View File

@@ -31,7 +31,7 @@ components:
branch: master
dest_dir: infra
fetch_tags: true
revision: v6427
revision: v6428
type: git
internal:
branch: master

View File

@@ -2036,7 +2036,7 @@ TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenInvalidTransferDirectionWh
builtinOpParams.dstMemObj = &dstMemObj;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
args.direction = static_cast<TransferDirection>(0xFF);
args.direction = static_cast<TransferDirection>(0xFF); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
EXPECT_ANY_THROW(queue->selectCsrForBuiltinOperation(args));
}

View File

@@ -1762,7 +1762,7 @@ HWTEST_F(BcsTests, givenAuxTranslationRequestWhenBlitCalledThenProgramCommandCor
HWTEST_F(BcsTests, givenInvalidBlitDirectionWhenConstructPropertiesThenExceptionIsThrow) {
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
EXPECT_THROW(ClBlitProperties::constructProperties(static_cast<BlitterConstants::BlitDirection>(7), csr, {}), std::exception);
EXPECT_THROW(ClBlitProperties::constructProperties(static_cast<BlitterConstants::BlitDirection>(7), csr, {}), std::exception); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
HWTEST_F(BcsTests, givenBlitterDirectSubmissionEnabledWhenProgrammingBlitterThenExpectRingBufferDispatched) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,6 @@ TEST(getInfoStatusMapper, GivenValidGetInfoStatusWhenTranslatingThenExpectedClCo
}
TEST(getInfoStatusMapper, GivenInvalidGetInfoStatusWhenTranslatingThenClInvalidValueIsReturned) {
auto getInfoStatus = changeGetInfoStatusToCLResultType(static_cast<GetInfoStatus>(1));
auto getInfoStatus = changeGetInfoStatusToCLResultType(static_cast<GetInfoStatus>(1)); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
EXPECT_EQ(CL_INVALID_VALUE, getInfoStatus);
}

View File

@@ -634,7 +634,7 @@ TEST_F(OfflineLinkerTest, GivenHelpRequestWhenExecuteIsInvokedThenHelpIsPrinted)
TEST_F(OfflineLinkerTest, GivenInvalidOperationModeWhenExecuteIsInvokedThenErrorIsIssued) {
MockOfflineLinker mockOfflineLinker{&mockArgHelper, std::move(mockOclocIgcFacade)};
mockOfflineLinker.operationMode = static_cast<OperationMode>(7);
mockOfflineLinker.operationMode = static_cast<OperationMode>(7); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
::testing::internal::CaptureStdout();
const auto executionResult{mockOfflineLinker.execute()};

View File

@@ -95,12 +95,12 @@ struct ElfEncoder {
template <typename SectionHeaderEnumT>
ElfSectionHeader<numBits> &appendSection(SectionHeaderEnumT sectionType, ConstStringRef sectionLabel, const ArrayRef<const uint8_t> sectionData) {
return appendSection(static_cast<SectionHeaderType>(sectionType), sectionLabel, sectionData);
return appendSection(static_cast<SectionHeaderType>(sectionType), sectionLabel, sectionData); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
template <typename SectionHeaderEnumT>
ElfSectionHeader<numBits> &appendSection(SectionHeaderEnumT sectionType, ConstStringRef sectionLabel, const std::string &sectionData) {
return appendSection(static_cast<SectionHeaderType>(sectionType), sectionLabel,
return appendSection(static_cast<SectionHeaderType>(sectionType), sectionLabel, // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
ArrayRef<const uint8_t>(reinterpret_cast<const uint8_t *>(sectionData.c_str()), sectionData.size() + 1));
}

View File

@@ -175,7 +175,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryForDifferentDeviceThenUnpacki
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_XE2_HPG_CORE);
NEO::Zebin::Elf::ZebinTargetFlags targetFlags;
targetDevice.productFamily = IGFX_UNKNOWN;
targetDevice.coreFamily = static_cast<GFXCORE_FAMILY>(zebin.machine + 1);
targetDevice.coreFamily = static_cast<GFXCORE_FAMILY>(zebin.machine + 1); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
targetFlags.machineEntryUsesGfxCoreInsteadOfProductFamily = true;
zebin.flags = targetFlags.packed;
unpackResult = NEO::unpackSingleDeviceBinary<NEO::DeviceBinaryFormat::zebin>(ArrayRef<const uint8_t>::fromAny(&zebin, 1U), "", targetDevice, unpackErrors, unpackWarnings);

View File

@@ -6462,7 +6462,7 @@ TEST(ValidateTargetDeviceTests, givenMismatechAotConfigWhenValidatingTargetDevic
targetDevice.aotConfig.value = 0x00001234;
targetDevice.maxPointerSizeInBytes = 8u;
auto mismatchedAotConfig = static_cast<AOT::PRODUCT_CONFIG>(0x00004321);
auto mismatchedAotConfig = static_cast<AOT::PRODUCT_CONFIG>(0x00004321); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
Zebin::Elf::ZebinTargetFlags targetMetadata;
auto res = validateTargetDevice(targetDevice, Zebin::Elf::EI_CLASS_64, productFamily, renderCoreFamily, mismatchedAotConfig, targetMetadata);
EXPECT_FALSE(res);

View File

@@ -32,7 +32,7 @@ struct AppResourceTests : public MockExecutionEnvironmentTagTest {
};
TEST_F(AppResourceTests, givenIncorrectGraphicsAllocationTypeWhenGettingResourceTagThenNOTFOUNDIsReturned) {
auto tag = AppResourceHelper::getResourceTagStr(static_cast<AllocationType>(999));
auto tag = AppResourceHelper::getResourceTagStr(static_cast<AllocationType>(999)); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
EXPECT_STREQ(tag, "NOTFOUND");
}

View File

@@ -24,7 +24,7 @@ TEST(EngineNodeHelperTest, givenValidEngineUsageWhenGettingStringRepresentationT
TEST(EngineNodeHelperTest, givenInValidEngineUsageWhenGettingStringRepresentationThenReturnUnknown) {
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineUsageToString(EngineUsage::engineUsageCount));
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineUsageToString(static_cast<EngineUsage>(0xcc)));
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineUsageToString(static_cast<EngineUsage>(0xcc))); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
TEST(EngineNodeHelperTest, givenValidEngineTypeWhenGettingStringRepresentationThenItIsCorrect) {
@@ -79,7 +79,7 @@ TEST(EngineNodeHelperTest, givenCcsWhenGettingCcsIndexThenReturnCorrectIndex) {
TEST(EngineNodeHelperTest, givenInvalidEngineTypeWhenGettingStringRepresentationThenItIsCorrect) {
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineTypeToString(aub_stream::EngineType::NUM_ENGINES));
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineTypeToString(static_cast<aub_stream::EngineType>(0xcc)));
EXPECT_EQ(std::string{"Unknown"}, EngineHelpers::engineTypeToString(static_cast<aub_stream::EngineType>(0xcc))); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
TEST(EngineNodeHelperTest, givenLinkCopyEnginesSupportedWhenGettingBcsEngineTypeThenFirstReturnMainCopyEngineAndThenRoundRobinBetweenLinkEngines) {

View File

@@ -14,14 +14,14 @@ TEST(GpuPageFaultHelperTest, givenValidAndInvalidFaultTypesWhenGettingStringRepr
EXPECT_EQ(std::string{"NotPresent"}, GpuPageFaultHelpers::faultTypeToString(FaultType::notPresent));
EXPECT_EQ(std::string{"WriteAccessViolation"}, GpuPageFaultHelpers::faultTypeToString(FaultType::writeAccessViolation));
EXPECT_EQ(std::string{"AtomicAccessViolation"}, GpuPageFaultHelpers::faultTypeToString(FaultType::atomicAccessViolation));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultTypeToString(static_cast<FaultType>(0xcc)));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultTypeToString(static_cast<FaultType>(0xcc))); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
TEST(GpuPageFaultHelperTest, givenValidAndInvalidFaultAccessesWhenGettingStringRepresentationThenItIsCorrect) {
EXPECT_EQ(std::string{"Read"}, GpuPageFaultHelpers::faultAccessToString(FaultAccess::read));
EXPECT_EQ(std::string{"Write"}, GpuPageFaultHelpers::faultAccessToString(FaultAccess::write));
EXPECT_EQ(std::string{"Atomic"}, GpuPageFaultHelpers::faultAccessToString(FaultAccess::atomic));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultAccessToString(static_cast<FaultAccess>(0xcc)));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultAccessToString(static_cast<FaultAccess>(0xcc))); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}
TEST(GpuPageFaultHelperTest, givenValidAndInvalidFaultLevelWhenGettingStringRepresentationThenItIsCorrect) {
@@ -30,5 +30,5 @@ TEST(GpuPageFaultHelperTest, givenValidAndInvalidFaultLevelWhenGettingStringRepr
EXPECT_EQ(std::string{"PDP"}, GpuPageFaultHelpers::faultLevelToString(FaultLevel::pdp));
EXPECT_EQ(std::string{"PML4"}, GpuPageFaultHelpers::faultLevelToString(FaultLevel::pml4));
EXPECT_EQ(std::string{"PML5"}, GpuPageFaultHelpers::faultLevelToString(FaultLevel::pml5));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultLevelToString(static_cast<FaultLevel>(0xcc)));
EXPECT_EQ(std::string{"Unknown"}, GpuPageFaultHelpers::faultLevelToString(static_cast<FaultLevel>(0xcc))); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
}

View File

@@ -502,7 +502,7 @@ TEST(AllocationTypeLoggingSingle, givenGraphicsAllocationTypeWhenConvertingToStr
DebugVariables flags;
FullyEnabledFileLogger fileLogger(testFile, flags);
GraphicsAllocation graphicsAllocation(0, 1u /*num gmms*/, static_cast<AllocationType>(999), nullptr, 0, 0, MemoryPool::memoryNull, MemoryManager::maxOsContextCount, 0llu);
GraphicsAllocation graphicsAllocation(0, 1u /*num gmms*/, static_cast<AllocationType>(999), nullptr, 0, 0, MemoryPool::memoryNull, MemoryManager::maxOsContextCount, 0llu); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
auto result = getAllocationTypeString(&graphicsAllocation);

View File

@@ -240,7 +240,7 @@ TEST_P(SoftwareTagsParametrizedTests, whenGetOpCodeIsCalledThenCorrectValueIsRet
}
TEST(SoftwareTagsTests, whenGetMarkerNoopIDCalledThenCorectValueIsReturned) {
uint32_t id = SWTags::BaseTag::getMarkerNoopID(static_cast<OpCode>(testOpCode));
uint32_t id = SWTags::BaseTag::getMarkerNoopID(static_cast<OpCode>(testOpCode)); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
EXPECT_EQ(testOpCode, id);
}