diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index e46cffefe9..46ef590ded 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -2423,7 +2423,7 @@ void CommandListCoreFamily::appendWaitOnInOrderDependency(std::sh for (uint32_t i = 0; i < inOrderExecInfo->getNumDevicePartitionsToWait(); i++) { if (relaxedOrderingAllowed) { - NEO::EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddress, waitValue, NEO::CompareOperation::Less, true, isQwordInOrderCounter()); + NEO::EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddress, waitValue, NEO::CompareOperation::less, true, isQwordInOrderCounter()); } else { using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT; @@ -3161,7 +3161,7 @@ inline bool CommandListCoreFamily::isAppendSplitNeeded(NEO::Memor return this->isBcsSplitNeeded && size >= minimalSizeForBcsSplit && - directionOut != NEO::TransferDirection::LocalToLocal; + directionOut != NEO::TransferDirection::localToLocal; } template @@ -3629,7 +3629,7 @@ void CommandListCoreFamily::appendWaitOnSingleEvent(Event *event, for (uint32_t i = 0u; i < packetsToWait; i++) { if (relaxedOrderingAllowed) { NEO::EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddr, Event::STATE_CLEARED, - NEO::CompareOperation::Equal, true, false); + NEO::CompareOperation::equal, true, false); } else { NEO::EncodeSemaphore::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(), gpuAddr, diff --git a/level_zero/core/source/device/bcs_split.cpp b/level_zero/core/source/device/bcs_split.cpp index 7706d127b6..dbe2fc46f3 100644 --- a/level_zero/core/source/device/bcs_split.cpp +++ b/level_zero/core/source/device/bcs_split.cpp @@ -105,9 +105,9 @@ void BcsSplit::releaseResources() { } std::vector &BcsSplit::getCmdQsForSplit(NEO::TransferDirection direction) { - if (direction == NEO::TransferDirection::HostToLocal) { + if (direction == NEO::TransferDirection::hostToLocal) { return this->h2dCmdQs; - } else if (direction == NEO::TransferDirection::LocalToHost) { + } else if (direction == NEO::TransferDirection::localToHost) { return this->d2hCmdQs; } diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index ceaedd891a..5ceef84aad 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -161,7 +161,7 @@ bool ModuleTranslationUnit::processSpecConstantInfo(NEO::CompilerInterface *comp if (pConstants) { NEO::SpecConstantInfo specConstInfo; auto retVal = compilerInterface->getSpecConstantsInfo(*device->getNEODevice(), ArrayRef(input, inputSize), specConstInfo); - if (retVal != NEO::TranslationOutput::ErrorCode::Success) { + if (retVal != NEO::TranslationOutput::ErrorCode::success) { return false; } for (uint32_t i = 0; i < pConstants->numConstants; i++) { @@ -208,7 +208,7 @@ ze_result_t ModuleTranslationUnit::compileGenBinary(NEO::TranslationInput &input this->updateBuildLog(compilerOuput.frontendCompilerLog); this->updateBuildLog(compilerOuput.backendCompilerLog); - if (NEO::TranslationOutput::ErrorCode::Success != compilerErr) { + if (NEO::TranslationOutput::ErrorCode::success != compilerErr) { driverHandle->clearErrorDescription(); return ZE_RESULT_ERROR_MODULE_BUILD_FAILURE; } @@ -1110,7 +1110,7 @@ bool ModuleImp::linkBinary() { translationUnit->programInfo.globalVariables.size, kernelDescriptors, translationUnit->programInfo.externalFunctions); this->symbols = linker.extractRelocatedSymbols(); - if (LinkingStatus::LinkedFully != linkStatus) { + if (LinkingStatus::linkedFully != linkStatus) { if (moduleBuildLog) { std::vector kernelNames; for (const auto &kernelInfo : this->translationUnit->programInfo.kernelInfos) { @@ -1120,7 +1120,7 @@ bool ModuleImp::linkBinary() { moduleBuildLog->appendString(error.c_str(), error.size()); } isFullyLinked = false; - return LinkingStatus::LinkedPartially == linkStatus; + return LinkingStatus::linkedPartially == linkStatus; } else if (type != ModuleType::builtin) { copyPatchedSegments(isaSegmentsForPatching); } else { diff --git a/level_zero/core/test/unit_tests/mocks/mock_module.h b/level_zero/core/test/unit_tests/mocks/mock_module.h index 454c37131f..29c949b981 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_module.h +++ b/level_zero/core/test/unit_tests/mocks/mock_module.h @@ -147,9 +147,9 @@ struct MockCompilerInterface : public NEO::CompilerInterface { cachingPassed = input.allowCaching; if (failBuild) { - return NEO::TranslationOutput::ErrorCode::BuildFailure; + return NEO::TranslationOutput::ErrorCode::buildFailure; } - return NEO::TranslationOutput::ErrorCode::Success; + return NEO::TranslationOutput::ErrorCode::success; } NEO::TranslationOutput::ErrorCode link(const NEO::Device &device, const NEO::TranslationInput &input, @@ -158,7 +158,7 @@ struct MockCompilerInterface : public NEO::CompilerInterface { receivedApiOptions = input.apiOptions.begin(); inputInternalOptions = input.internalOptions.begin(); - return NEO::TranslationOutput::ErrorCode::Success; + return NEO::TranslationOutput::ErrorCode::success; } std::string receivedApiOptions; @@ -176,7 +176,7 @@ struct MockCompilerInterfaceWithSpecConstants : public NEO::CompilerInterface { EXPECT_EQ(moduleNumSpecConstants, input.specializedValues.size()); - return NEO::TranslationOutput::ErrorCode::Success; + return NEO::TranslationOutput::ErrorCode::success; } NEO::TranslationOutput::ErrorCode link(const NEO::Device &device, const NEO::TranslationInput &input, @@ -184,7 +184,7 @@ struct MockCompilerInterfaceWithSpecConstants : public NEO::CompilerInterface { EXPECT_EQ(moduleNumSpecConstants, input.specializedValues.size()); - return NEO::TranslationOutput::ErrorCode::Success; + return NEO::TranslationOutput::ErrorCode::success; } NEO::TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device, @@ -195,7 +195,7 @@ struct MockCompilerInterfaceWithSpecConstants : public NEO::CompilerInterface { output.idsBuffer->PushBackRawCopy(moduleSpecConstantsIds[i]); output.sizesBuffer->PushBackRawCopy(moduleSpecConstantsSizes[i]); } - return NEO::TranslationOutput::ErrorCode::Success; + return NEO::TranslationOutput::ErrorCode::success; } uint32_t moduleNumSpecConstants = 0u; const std::vector moduleSpecConstantsIds{2, 0, 1, 3, 5, 4}; @@ -210,7 +210,7 @@ struct MockCompilerInterfaceLinkFailure : public NEO::CompilerInterface { const NEO::TranslationInput &input, NEO::TranslationOutput &output) override { - return NEO::TranslationOutput::ErrorCode::BuildFailure; + return NEO::TranslationOutput::ErrorCode::buildFailure; } }; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index 0d70700e1e..e5752f30e5 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -1777,7 +1777,7 @@ HWTEST2_F(CommandListCreate, givenInOrderExecutionWhenDispatchingRelaxedOrdering lrrCmd++; EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(lrrCmd, 0, cmdList->inOrderExecInfo->getDeviceCounterAllocation().getGpuAddress(), 2, - NEO::CompareOperation::Less, true, cmdList->isQwordInOrderCounter())); + NEO::CompareOperation::less, true, cmdList->isQwordInOrderCounter())); } TEST_F(CommandListCreate, GivenGpuHangWhenCreatingImmCmdListWithSyncModeAndAppendBarrierThenAppendBarrierReturnsDeviceLost) { diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp index 312502fc58..eb960fd4f6 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp @@ -2377,7 +2377,7 @@ HWTEST2_F(InOrderCmdListTests, givenRelaxedOrderingWhenProgrammingTimestampEvent auto eventEndGpuVa = events[0]->getCompletionFieldGpuAddress(device); EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(lrrCmd, 0, eventEndGpuVa, static_cast(Event::STATE_CLEARED), - NEO::CompareOperation::Equal, true, false)); + NEO::CompareOperation::equal, true, false)); auto sdiCmd = genCmdCast(ptrOffset(lrrCmd, EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(false))); ASSERT_NE(nullptr, sdiCmd); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp index 00d6b675dc..d109c3412d 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp @@ -131,24 +131,24 @@ HWTEST2_F(CommandListAppendWaitOnEvent, givenImmediateCmdListWithDirectSubmissio EXPECT_EQ(miMathCmd->DW0.BitField.DwordLength, 3u); auto miAluCmd = reinterpret_cast(++miMathCmd); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCA), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srca), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCB), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_8), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srcb), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::gpr8), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_SUB), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_NONE), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_NONE), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeSub), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeNone), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::opcodeNone), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_STORE), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_ZF), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeStore), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::zf), miAluCmd->DW0.BitField.Operand2); lrrCmd = reinterpret_cast(++miAluCmd); EXPECT_EQ(lrrCmd->getSourceRegisterAddress(), RegisterOffsets::csGprR7); diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 0a2a8d2117..a8f6c103ad 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -189,7 +189,7 @@ HWTEST_F(ModuleTest, givenBlitterAvailableWhenCopyingPatchedSegmentsThenIsaIsTra Vec3 size) -> NEO::BlitOperationResult { memcpy(memory->getUnderlyingBuffer(), hostPtr, size.x); blitterCalled++; - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup( &NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation); @@ -769,7 +769,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler FailingMockCompilerInterfaceWithSpecConstants(uint32_t moduleNumSpecConstants) : MockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants) {} NEO::TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device, ArrayRef srcSpirV, NEO::SpecConstantInfo &output) override { - return NEO::TranslationOutput::ErrorCode::CompilerNotAvailable; + return NEO::TranslationOutput::ErrorCode::compilerNotAvailable; } }; mockCompiler = new FailingMockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants); @@ -856,7 +856,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler FailingMockCompilerInterfaceWithSpecConstants(uint32_t moduleNumSpecConstants) : MockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants) {} NEO::TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device, ArrayRef srcSpirV, NEO::SpecConstantInfo &output) override { - return NEO::TranslationOutput::ErrorCode::CompilerNotAvailable; + return NEO::TranslationOutput::ErrorCode::compilerNotAvailable; } }; mockCompiler = new FailingMockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants); diff --git a/opencl/source/built_ins/builtins_dispatch_builder.h b/opencl/source/built_ins/builtins_dispatch_builder.h index d6e827e6bf..47908557fe 100644 --- a/opencl/source/built_ins/builtins_dispatch_builder.h +++ b/opencl/source/built_ins/builtins_dispatch_builder.h @@ -51,7 +51,7 @@ struct BuiltinOpParams { uint32_t dstMipLevel = 0; void *userPtrForPostOperationCpuCopy = nullptr; bool bcsSplit = false; - TransferDirection direction = TransferDirection::LocalToLocal; + TransferDirection direction = TransferDirection::localToLocal; }; class BuiltinDispatchInfoBuilder { diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 8226aa8daf..d7aacda89c 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -272,7 +272,7 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec bool preferBcs = true; aub_stream::EngineType preferredBcsEngineType = aub_stream::EngineType::NUM_ENGINES; switch (args.direction) { - case TransferDirection::LocalToLocal: { + case TransferDirection::localToLocal: { const auto &clGfxCoreHelper = device->getRootDeviceEnvironment().getHelper(); preferBcs = clGfxCoreHelper.preferBlitterForLocalToLocalTransfers(); if (auto flag = debugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get(); flag != -1) { @@ -283,9 +283,9 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec } break; } - case TransferDirection::HostToHost: - case TransferDirection::HostToLocal: - case TransferDirection::LocalToHost: { + case TransferDirection::hostToHost: + case TransferDirection::hostToLocal: + case TransferDirection::localToHost: { preferBcs = true; auto preferredBCSType = true; diff --git a/opencl/source/command_queue/command_queue.h b/opencl/source/command_queue/command_queue.h index 2ef599e8e9..33558df257 100644 --- a/opencl/source/command_queue/command_queue.h +++ b/opencl/source/command_queue/command_queue.h @@ -47,9 +47,9 @@ struct MultiDispatchInfo; struct TimestampPacketDependencies; enum class QueuePriority { - LOW, - MEDIUM, - HIGH + low, + medium, + high }; template <> @@ -443,7 +443,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> { cl_uint queueIndexWithinFamily = 0; bool queueFamilySelected = false; - QueuePriority priority = QueuePriority::MEDIUM; + QueuePriority priority = QueuePriority::medium; QueueThrottle throttle = QueueThrottle::MEDIUM; EnqueueProperties::Operation latestSentEnqueueType = EnqueueProperties::Operation::none; uint64_t sliceCount = QueueSliceCount::defaultSliceCount; diff --git a/opencl/source/command_queue/command_queue_hw.h b/opencl/source/command_queue/command_queue_hw.h index 593bba4938..eb414d3249 100644 --- a/opencl/source/command_queue/command_queue_hw.h +++ b/opencl/source/command_queue/command_queue_hw.h @@ -46,12 +46,12 @@ class CommandQueueHw : public CommandQueue { auto clPriority = getCmdQueueProperties(properties, CL_QUEUE_PRIORITY_KHR); if (clPriority & static_cast(CL_QUEUE_PRIORITY_LOW_KHR)) { - priority = QueuePriority::LOW; + priority = QueuePriority::low; this->gpgpuEngine = &device->getNearestGenericSubDevice(0)->getEngine(getChosenEngineType(device->getHardwareInfo()), EngineUsage::lowPriority); } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_MED_KHR)) { - priority = QueuePriority::MEDIUM; + priority = QueuePriority::medium; } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_HIGH_KHR)) { - priority = QueuePriority::HIGH; + priority = QueuePriority::high; } auto clThrottle = getCmdQueueProperties(properties, CL_QUEUE_THROTTLE_KHR); diff --git a/opencl/source/command_queue/csr_selection_args.h b/opencl/source/command_queue/csr_selection_args.h index f190cc1c85..7a94967ab8 100644 --- a/opencl/source/command_queue/csr_selection_args.h +++ b/opencl/source/command_queue/csr_selection_args.h @@ -33,7 +33,7 @@ struct CsrSelectionArgs { CsrSelectionArgs(cl_command_type cmdType, const size_t *size) : cmdType(cmdType), size(size), - direction(TransferDirection::HostToHost) {} + direction(TransferDirection::hostToHost) {} template CsrSelectionArgs(cl_command_type cmdType, ResourceType *src, ResourceType *dst, uint32_t rootDeviceIndex, const size_t *size) diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index 685554b3c4..b438df2670 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -890,7 +890,7 @@ CompletionStamp CommandQueueHw::enqueueNonBlocked( multiDispatchInfo.usesSlm(), // useSLM !getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled() || commandType == CL_COMMAND_FILL_BUFFER, // guardCommandBufferWithPipeControl commandType == CL_COMMAND_NDRANGE_KERNEL, // GSBA32BitRequired - (QueuePriority::LOW == priority), // lowPriority + (QueuePriority::low == priority), // lowPriority implicitFlush, // implicitFlush !eventBuilder.getEvent() || getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed false, // epilogueRequired @@ -1236,7 +1236,7 @@ bool CommandQueueHw::isSplitEnqueueBlitNeeded(TransferDirection trans auto bcsSplit = getDevice().isBcsSplitSupported() && csr.getOsContext().getEngineType() == aub_stream::EngineType::ENGINE_BCS && transferSize >= minimalSizeForBcsSplit && - transferDirection != TransferDirection::LocalToLocal; + transferDirection != TransferDirection::localToLocal; if (bcsSplit) { this->constructBcsEnginesForSplit(); @@ -1263,9 +1263,9 @@ cl_int CommandQueueHw::enqueueBlitSplit(MultiDispatchInfo &dispatchIn StackVec copyEngines; auto splitEngines = this->splitEngines; - if (dispatchInfo.peekBuiltinOpParams().direction == NEO::TransferDirection::HostToLocal) { + if (dispatchInfo.peekBuiltinOpParams().direction == NEO::TransferDirection::hostToLocal) { splitEngines = this->h2dEngines; - } else if (dispatchInfo.peekBuiltinOpParams().direction == NEO::TransferDirection::LocalToHost) { + } else if (dispatchInfo.peekBuiltinOpParams().direction == NEO::TransferDirection::localToHost) { splitEngines = this->d2hEngines; } diff --git a/opencl/source/command_queue/gpgpu_walker_base.inl b/opencl/source/command_queue/gpgpu_walker_base.inl index 3ae31a5c8f..41b9472a5f 100644 --- a/opencl/source/command_queue/gpgpu_walker_base.inl +++ b/opencl/source/command_queue/gpgpu_walker_base.inl @@ -64,22 +64,22 @@ void GpgpuWalkerHelper::addAluReadModifyWriteRegister( // Setup first operand of MI_MATH - load CS_GPR_R0 into register A cmdAluParam.DW0.BitField.ALUOpcode = - static_cast(AluRegisters::OPCODE_LOAD); + static_cast(AluRegisters::opcodeLoad); cmdAluParam.DW0.BitField.Operand1 = - static_cast(AluRegisters::R_SRCA); + static_cast(AluRegisters::srca); cmdAluParam.DW0.BitField.Operand2 = - static_cast(AluRegisters::R_0); + static_cast(AluRegisters::gpr0); *pAluParam = cmdAluParam; pAluParam++; cmdAluParam.DW0.Value = 0x0; // Setup second operand of MI_MATH - load CS_GPR_R1 into register B cmdAluParam.DW0.BitField.ALUOpcode = - static_cast(AluRegisters::OPCODE_LOAD); + static_cast(AluRegisters::opcodeLoad); cmdAluParam.DW0.BitField.Operand1 = - static_cast(AluRegisters::R_SRCB); + static_cast(AluRegisters::srcb); cmdAluParam.DW0.BitField.Operand2 = - static_cast(AluRegisters::R_1); + static_cast(AluRegisters::gpr1); *pAluParam = cmdAluParam; pAluParam++; @@ -94,11 +94,11 @@ void GpgpuWalkerHelper::addAluReadModifyWriteRegister( cmdAluParam.DW0.Value = 0x0; // Setup fourth operand of MI_MATH - store result into CS_GPR_R0 cmdAluParam.DW0.BitField.ALUOpcode = - static_cast(AluRegisters::OPCODE_STORE); + static_cast(AluRegisters::opcodeStore); cmdAluParam.DW0.BitField.Operand1 = - static_cast(AluRegisters::R_0); + static_cast(AluRegisters::gpr0); cmdAluParam.DW0.BitField.Operand2 = - static_cast(AluRegisters::R_ACCU); + static_cast(AluRegisters::accu); *pAluParam = cmdAluParam; // LOAD value of CS_GPR_R0 into "Register" diff --git a/opencl/source/gen8/gpgpu_walker_gen8.cpp b/opencl/source/gen8/gpgpu_walker_gen8.cpp index 89cf017e34..6dcaba4fd5 100644 --- a/opencl/source/gen8/gpgpu_walker_gen8.cpp +++ b/opencl/source/gen8/gpgpu_walker_gen8.cpp @@ -20,7 +20,7 @@ void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream if (disablePerfMode) { if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { // Set bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::OPCODE_OR, RegisterConstants::l3SqcBitLqscR0PerfDis); + GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeOr, RegisterConstants::l3SqcBitLqscR0PerfDis); } } else { if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { @@ -31,7 +31,7 @@ void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream pipeControl.setCommandStreamerStallEnable(true); *pipeControlSpace = pipeControl; // Clear bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::OPCODE_AND, ~RegisterConstants::l3SqcBitLqscR0PerfDis); + GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeAnd, ~RegisterConstants::l3SqcBitLqscR0PerfDis); } } } diff --git a/opencl/source/gen9/gpgpu_walker_gen9.cpp b/opencl/source/gen9/gpgpu_walker_gen9.cpp index a59eaf07ea..72a7529ee5 100644 --- a/opencl/source/gen9/gpgpu_walker_gen9.cpp +++ b/opencl/source/gen9/gpgpu_walker_gen9.cpp @@ -19,7 +19,7 @@ void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream if (disablePerfMode) { if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { // Set bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::OPCODE_OR, RegisterConstants::l3SqcBitLqscR0PerfDis); + GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeOr, RegisterConstants::l3SqcBitLqscR0PerfDis); } } else { if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { @@ -31,7 +31,7 @@ void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream *pipeControlSpace = pipeControl; // Clear bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::OPCODE_AND, ~RegisterConstants::l3SqcBitLqscR0PerfDis); + GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeAnd, ~RegisterConstants::l3SqcBitLqscR0PerfDis); } } } diff --git a/opencl/source/helpers/task_information.cpp b/opencl/source/helpers/task_information.cpp index f5cf8759c6..ef872d832e 100644 --- a/opencl/source/helpers/task_information.cpp +++ b/opencl/source/helpers/task_information.cpp @@ -70,7 +70,7 @@ CompletionStamp &CommandMapUnmap::submit(TaskCountType taskLevel, bool terminate false, // useSLM !commandQueue.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl false, // GSBA32BitRequired - commandQueue.getPriority() == QueuePriority::LOW, // lowPriority + commandQueue.getPriority() == QueuePriority::low, // lowPriority false, // implicitFlush commandQueue.getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed false, // epilogueRequired @@ -206,7 +206,7 @@ CompletionStamp &CommandComputeKernel::submit(TaskCountType taskLevel, bool term slmUsed, // useSLM !commandQueue.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl commandType == CL_COMMAND_NDRANGE_KERNEL, // GSBA32BitRequired - commandQueue.getPriority() == QueuePriority::LOW, // lowPriority + commandQueue.getPriority() == QueuePriority::low, // lowPriority false, // implicitFlush commandQueue.getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed false, // epilogueRequired @@ -382,7 +382,7 @@ CompletionStamp &CommandWithoutKernel::submit(TaskCountType taskLevel, bool term false, // useSLM !commandStreamReceiver.isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl false, // GSBA32BitRequired - commandQueue.getPriority() == QueuePriority::LOW, // lowPriority + commandQueue.getPriority() == QueuePriority::low, // lowPriority false, // implicitFlush commandStreamReceiver.isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed false, // epilogueRequired diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index 4965bce037..d20b05fd34 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -1199,7 +1199,7 @@ void Kernel::performKernelTuning(CommandStreamReceiver &commandStreamReceiver, c KernelSubmissionData submissionData; submissionData.kernelStandardTimestamps = std::make_unique(); submissionData.kernelSubdeviceTimestamps = std::make_unique(); - submissionData.status = TunningStatus::STANDARD_TUNNING_IN_PROGRESS; + submissionData.status = TunningStatus::standardTunningInProgress; submissionData.kernelStandardTimestamps->assignAndIncrementNodesRefCounts(*timestampContainer); this->kernelSubmissionMap[config] = std::move(submissionData); this->singleSubdevicePreferredInCurrentEnqueue = false; @@ -1208,13 +1208,13 @@ void Kernel::performKernelTuning(CommandStreamReceiver &commandStreamReceiver, c auto &submissionData = submissionDataIt->second; - if (submissionData.status == TunningStatus::TUNNING_DONE) { + if (submissionData.status == TunningStatus::tunningDone) { this->singleSubdevicePreferredInCurrentEnqueue = submissionData.singleSubdevicePreferred; } - if (submissionData.status == TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS) { + if (submissionData.status == TunningStatus::subdeviceTunningInProgress) { if (this->hasTunningFinished(submissionData)) { - submissionData.status = TunningStatus::TUNNING_DONE; + submissionData.status = TunningStatus::tunningDone; submissionData.kernelStandardTimestamps.reset(); submissionData.kernelSubdeviceTimestamps.reset(); this->singleSubdevicePreferredInCurrentEnqueue = submissionData.singleSubdevicePreferred; @@ -1223,8 +1223,8 @@ void Kernel::performKernelTuning(CommandStreamReceiver &commandStreamReceiver, c } } - if (submissionData.status == TunningStatus::STANDARD_TUNNING_IN_PROGRESS) { - submissionData.status = TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS; + if (submissionData.status == TunningStatus::standardTunningInProgress) { + submissionData.status = TunningStatus::subdeviceTunningInProgress; submissionData.kernelSubdeviceTimestamps->assignAndIncrementNodesRefCounts(*timestampContainer); this->singleSubdevicePreferredInCurrentEnqueue = true; } diff --git a/opencl/source/kernel/kernel.h b/opencl/source/kernel/kernel.h index 8cb68bf27a..1ea34499b0 100644 --- a/opencl/source/kernel/kernel.h +++ b/opencl/source/kernel/kernel.h @@ -75,9 +75,9 @@ class Kernel : public ReferenceTrackedObject { }; enum class TunningStatus { - STANDARD_TUNNING_IN_PROGRESS, - SUBDEVICE_TUNNING_IN_PROGRESS, - TUNNING_DONE + standardTunningInProgress, + subdeviceTunningInProgress, + tunningDone }; enum class TunningType { diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index eb2ae4df81..b571bb10ef 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -219,13 +219,13 @@ bool inline copyHostPointer(Buffer *buffer, memory->setTbxWritable(true, GraphicsAllocation::defaultBank); return true; } else { - auto blitMemoryToAllocationResult = BlitOperationResult::Unsupported; + auto blitMemoryToAllocationResult = BlitOperationResult::unsupported; if (productHelper.isBlitterFullySupported(hwInfo) && isLocalMemory) { blitMemoryToAllocationResult = BlitHelperFunctions::blitMemoryToAllocation(device, memory, buffer->getOffset(), hostPtr, {size, 1, 1}); } - if (blitMemoryToAllocationResult != BlitOperationResult::Success) { + if (blitMemoryToAllocationResult != BlitOperationResult::success) { auto context = buffer->getContext(); auto cmdQ = context->getSpecialQueue(rootDeviceIndex); auto mapAllocation = buffer->getMapAllocation(rootDeviceIndex); diff --git a/opencl/source/program/process_device_binary.cpp b/opencl/source/program/process_device_binary.cpp index ad6a384e48..14019e6418 100644 --- a/opencl/source/program/process_device_binary.cpp +++ b/opencl/source/program/process_device_binary.cpp @@ -126,7 +126,7 @@ cl_int Program::linkBinary(Device *pDevice, const void *constantsInitData, size_ } Linker::UnresolvedExternals unresolvedExternalsInfo; - bool linkSuccess = LinkingStatus::LinkedFully == linker.link(globals, constants, exportedFunctions, strings, + bool linkSuccess = LinkingStatus::linkedFully == linker.link(globals, constants, exportedFunctions, strings, globalsForPatching, constantsForPatching, isaSegmentsForPatching, unresolvedExternalsInfo, pDevice, constantsInitData, constantsInitDataSize, diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 7f972416b8..7e057fac67 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -262,7 +262,7 @@ cl_int Program::setProgramSpecializationConstant(cl_uint specId, size_t specSize SpecConstantInfo specConstInfo; auto retVal = pCompilerInterface->getSpecConstantsInfo(device, ArrayRef(irBinary.get(), irBinarySize), specConstInfo); - if (retVal != TranslationOutput::ErrorCode::Success) { + if (retVal != TranslationOutput::ErrorCode::success) { return CL_INVALID_VALUE; } diff --git a/opencl/source/program/program.h b/opencl/source/program/program.h index d2b6dd478a..bcd6312bc8 100644 --- a/opencl/source/program/program.h +++ b/opencl/source/program/program.h @@ -50,15 +50,15 @@ constexpr cl_int asClError(TranslationOutput::ErrorCode err) { switch (err) { default: return CL_OUT_OF_HOST_MEMORY; - case TranslationOutput::ErrorCode::Success: + case TranslationOutput::ErrorCode::success: return CL_SUCCESS; - case TranslationOutput::ErrorCode::CompilerNotAvailable: + case TranslationOutput::ErrorCode::compilerNotAvailable: return CL_COMPILER_NOT_AVAILABLE; - case TranslationOutput::ErrorCode::CompilationFailure: + case TranslationOutput::ErrorCode::compilationFailure: return CL_COMPILE_PROGRAM_FAILURE; - case TranslationOutput::ErrorCode::BuildFailure: + case TranslationOutput::ErrorCode::buildFailure: return CL_BUILD_PROGRAM_FAILURE; - case TranslationOutput::ErrorCode::LinkFailure: + case TranslationOutput::ErrorCode::linkFailure: return CL_LINK_PROGRAM_FAILURE; } } diff --git a/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp b/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp index 8c85c1143a..87b6c18879 100644 --- a/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp +++ b/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp @@ -474,9 +474,9 @@ HWTEST_F(LowPriorityCommandQueueTest, GivenDeviceWithSubdevicesWhenCreatingLowPr } std::pair priorityParams[3]{ - std::make_pair(CL_QUEUE_PRIORITY_LOW_KHR, QueuePriority::LOW), - std::make_pair(CL_QUEUE_PRIORITY_MED_KHR, QueuePriority::MEDIUM), - std::make_pair(CL_QUEUE_PRIORITY_HIGH_KHR, QueuePriority::HIGH)}; + std::make_pair(CL_QUEUE_PRIORITY_LOW_KHR, QueuePriority::low), + std::make_pair(CL_QUEUE_PRIORITY_MED_KHR, QueuePriority::medium), + std::make_pair(CL_QUEUE_PRIORITY_HIGH_KHR, QueuePriority::high)}; class ClCreateCommandQueueWithPropertiesApiPriority : public ClCreateCommandQueueWithPropertiesApi, public ::testing::WithParamInterface> { diff --git a/opencl/test/unit_test/aub_tests/command_stream/mi_math_aub_tests_dg2_and_later.cpp b/opencl/test/unit_test/aub_tests/command_stream/mi_math_aub_tests_dg2_and_later.cpp index 730588f4f4..61187ad8ce 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/mi_math_aub_tests_dg2_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_stream/mi_math_aub_tests_dg2_and_later.cpp @@ -92,31 +92,31 @@ struct MiMath : public AUBFixture, public ::testing::Test { void loadAddressToMiMathAccu(uint32_t lowAddressRegister, uint32_t highAddressRegister, uint32_t shiftReg) { using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(numberOfOperationToLoadAddressToMiMathAccu * sizeof(MI_MATH_ALU_INST_INLINE))); - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load high part of address from register with older to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load high part of address from register with older to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); pAluParam->DW0.BitField.Operand2 = highAddressRegister; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load 32 - value from shiftReg , to SRCB (to shift high part in register) - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load 32 - value from shiftReg , to SRCB (to shift high part in register) + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); pAluParam->DW0.BitField.Operand2 = shiftReg; pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeShl); // shift high part pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // move result to highAddressRegister + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // move result to highAddressRegister pAluParam->DW0.BitField.Operand1 = highAddressRegister; - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load highAddressRegister to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load highAddressRegister to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); pAluParam->DW0.BitField.Operand2 = highAddressRegister; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load low part of address to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load low part of address to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); pAluParam->DW0.BitField.Operand2 = lowAddressRegister; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_OR); // join parts of address and locate in ACCU + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeOr); // join parts of address and locate in ACCU pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; } @@ -156,49 +156,49 @@ HWTEST2_F(MiMath, givenLoadIndirectFromMemoryWhenUseMiMathToSimpleOperationThenS reinterpret_cast(pCmd)->DW0.BitField.InstructionType = MI_MATH::COMMAND_TYPE_MI_COMMAND; reinterpret_cast(pCmd)->DW0.BitField.InstructionOpcode = MI_MATH::MI_COMMAND_OPCODE_MI_MATH; reinterpret_cast(pCmd)->DW0.BitField.DwordLength = numberOfOperationToLoadAddressToMiMathAccu + 13 - 1; - loadAddressToMiMathAccu(static_cast(AluRegisters::R_0), static_cast(AluRegisters::R_1), static_cast(AluRegisters::R_2)); // GPU address of buffer load to ACCU register + loadAddressToMiMathAccu(static_cast(AluRegisters::gpr0), static_cast(AluRegisters::gpr1), static_cast(AluRegisters::gpr2)); // GPU address of buffer load to ACCU register MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(13 * sizeof(MI_MATH_ALU_INST_INLINE))); pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeLoadind); // load dword from memory address located in ACCU - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_0); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr0); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // copy address from ACCU to R2 - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_2); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // copy address from ACCU to R2 + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr2); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // R0 to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_0); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // R0 to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr0); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // R3 to SRCB where is value of 'valueToAdd' - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_3); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // R3 to SRCB where is value of 'valueToAdd' + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr3); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_ADD); // do simple add on registers SRCA and SRCB + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeAdd); // do simple add on registers SRCA and SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // R3 to SRCB where is value of 'valueToAdd' - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_1); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // R3 to SRCB where is value of 'valueToAdd' + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr1); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load address from R2 where is copy of address to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_2); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load address from R2 where is copy of address to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr2); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeLoad0); - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_ADD); // move address to ACCU + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeAdd); // move address to ACCU pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; @@ -207,8 +207,8 @@ HWTEST2_F(MiMath, givenLoadIndirectFromMemoryWhenUseMiMathToSimpleOperationThenS pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeStoreind); // store to memory from ACCU, value from register R1 - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_ACCU); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_1); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::accu); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr1); flushStream(); @@ -245,7 +245,7 @@ HWTEST2_F(MiMath, givenLoadIndirectFromMemoryWhenUseMiMathThenStoreIndirectToAno reinterpret_cast(pCmd)->DW0.BitField.InstructionOpcode = MI_MATH::MI_COMMAND_OPCODE_MI_MATH; reinterpret_cast(pCmd)->DW0.BitField.DwordLength = numberOfOperationToLoadAddressToMiMathAccu * 2 + 6 - 1; - loadAddressToMiMathAccu(static_cast(AluRegisters::R_0), static_cast(AluRegisters::R_1), static_cast(AluRegisters::R_2)); // GPU address of buffer load to ACCU register + loadAddressToMiMathAccu(static_cast(AluRegisters::gpr0), static_cast(AluRegisters::gpr1), static_cast(AluRegisters::gpr2)); // GPU address of buffer load to ACCU register MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(3 * sizeof(MI_MATH_ALU_INST_INLINE))); pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed @@ -253,14 +253,14 @@ HWTEST2_F(MiMath, givenLoadIndirectFromMemoryWhenUseMiMathThenStoreIndirectToAno pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeLoadind); // load dword from memory address located in ACCU to R0 - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_0); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr0); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; - loadAddressToMiMathAccu(static_cast(AluRegisters::R_3), static_cast(AluRegisters::R_4), static_cast(AluRegisters::R_2)); // GPU address of bufferB load to ACCU register + loadAddressToMiMathAccu(static_cast(AluRegisters::gpr3), static_cast(AluRegisters::gpr4), static_cast(AluRegisters::gpr2)); // GPU address of bufferB load to ACCU register pAluParam = reinterpret_cast(taskStream->getSpace(3 * sizeof(MI_MATH_ALU_INST_INLINE))); pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed @@ -268,8 +268,8 @@ HWTEST2_F(MiMath, givenLoadIndirectFromMemoryWhenUseMiMathThenStoreIndirectToAno pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeStoreind); // store to memory from ACCU, value from register R0 - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_ACCU); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_0); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::accu); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr0); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed pAluParam->DW0.BitField.Operand1 = 0; @@ -309,33 +309,33 @@ HWTEST2_F(MiMath, givenValueToMakeLeftLogicalShiftWhenUseMiMathThenShiftIsDonePr reinterpret_cast(pCmd)->DW0.BitField.DwordLength = 7 - 1; MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(7 * sizeof(MI_MATH_ALU_INST_INLINE))); - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value from R0 to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_0); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value from R0 to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr0); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_1); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr1); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeShl); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_1); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr1); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_2); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr2); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeShl); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_2); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr2); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); storeValueInRegisterToMemory(buffer->getGraphicsAllocation(rootDeviceIndex)->getGpuAddress(), RegisterOffsets::csGprR1); storeValueInRegisterToMemory(buffer->getGraphicsAllocation(rootDeviceIndex)->getGpuAddress() + 4, RegisterOffsets::csGprR2); @@ -380,33 +380,33 @@ HWTEST2_F(MiMath, givenValueToMakeRightLogicalShiftWhenUseMiMathThenShiftIsDoneP reinterpret_cast(pCmd)->DW0.BitField.DwordLength = 7 - 1; MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(7 * sizeof(MI_MATH_ALU_INST_INLINE))); - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value from R0 to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_0); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value from R0 to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr0); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_1); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr1); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeShr); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_1); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr1); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_2); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr2); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeShr); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_2); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr2); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); storeValueInRegisterToMemory(allocation->getGpuAddress(), RegisterOffsets::csGprR1); storeValueInRegisterToMemory(allocation->getGpuAddress() + 4, RegisterOffsets::csGprR2); @@ -450,43 +450,43 @@ HWTEST2_F(MiMath, givenValueToMakeRightAritmeticShiftWhenUseMiMathThenShiftIsDon reinterpret_cast(pCmd)->DW0.BitField.InstructionType = MI_MATH::COMMAND_TYPE_MI_COMMAND; reinterpret_cast(pCmd)->DW0.BitField.InstructionOpcode = MI_MATH::MI_COMMAND_OPCODE_MI_MATH; reinterpret_cast(pCmd)->DW0.BitField.DwordLength = numberOfOperationToLoadAddressToMiMathAccu + 9 - 1; - loadAddressToMiMathAccu(static_cast(AluRegisters::R_0), static_cast(AluRegisters::R_1), static_cast(AluRegisters::R_2)); // GPU address of buffer load to ACCU register + loadAddressToMiMathAccu(static_cast(AluRegisters::gpr0), static_cast(AluRegisters::gpr1), static_cast(AluRegisters::gpr2)); // GPU address of buffer load to ACCU register MI_MATH_ALU_INST_INLINE *pAluParam = reinterpret_cast(taskStream->getSpace(9 * sizeof(MI_MATH_ALU_INST_INLINE))); pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeLoadind); // load value from R0 to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_3); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr3); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeFence); // to be sure that all writes and reads are completed pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value from R0 to SRCA - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_3); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value from R0 to SRCA + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srca); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr3); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_4); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr4); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeSar); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_4); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr4); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_5); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::gpr5); pAluParam++; pAluParam->DW0.BitField.ALUOpcode = static_cast(NewAluOpcodes::opcodeSar); // load value to shift to SRCB pAluParam->DW0.BitField.Operand1 = 0; pAluParam->DW0.BitField.Operand2 = 0; pAluParam++; - pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); // load value to shift to SRCB - pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::R_5); - pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::R_ACCU); + pAluParam->DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); // load value to shift to SRCB + pAluParam->DW0.BitField.Operand1 = static_cast(AluRegisters::gpr5); + pAluParam->DW0.BitField.Operand2 = static_cast(AluRegisters::accu); storeValueInRegisterToMemory(allocation->getGpuAddress(), RegisterOffsets::csGprR4); storeValueInRegisterToMemory(allocation->getGpuAddress() + 4, RegisterOffsets::csGprR5); @@ -586,7 +586,7 @@ void ConditionalBbStartTests::whenDispatchingEqualModeThenResultsAreValidImpl { uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa, baseCompareValue, NEO::CompareOperation::Equal, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa, baseCompareValue, NEO::CompareOperation::equal, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped @@ -599,7 +599,7 @@ void ConditionalBbStartTests::whenDispatchingEqualModeThenResultsAreValidImpl // Greater { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::Equal, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::equal, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa + sizeof(TestCompareDataT), getAtomicOpcode(), @@ -609,7 +609,7 @@ void ConditionalBbStartTests::whenDispatchingEqualModeThenResultsAreValidImpl // Less { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::Equal, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::equal, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa + (sizeof(TestCompareDataT) * 2), getAtomicOpcode(), @@ -641,7 +641,7 @@ void ConditionalBbStartTests::whenDispatchingNotEqualModeThenResultsAreValidI // Equal { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa, baseCompareValue, NEO::CompareOperation::NotEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa, baseCompareValue, NEO::CompareOperation::notEqual, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa, getAtomicOpcode(), @@ -654,7 +654,7 @@ void ConditionalBbStartTests::whenDispatchingNotEqualModeThenResultsAreValidI uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::NotEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::notEqual, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped @@ -668,7 +668,7 @@ void ConditionalBbStartTests::whenDispatchingNotEqualModeThenResultsAreValidI { uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::NotEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::notEqual, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped @@ -703,7 +703,7 @@ void ConditionalBbStartTests::whenDispatchingGreaterOrEqualModeThenResultsAre { uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa, baseCompareValue, NEO::CompareOperation::GreaterOrEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa, baseCompareValue, NEO::CompareOperation::greaterOrEqual, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped @@ -718,7 +718,7 @@ void ConditionalBbStartTests::whenDispatchingGreaterOrEqualModeThenResultsAre uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::GreaterOrEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::greaterOrEqual, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped @@ -730,7 +730,7 @@ void ConditionalBbStartTests::whenDispatchingGreaterOrEqualModeThenResultsAre // Less { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::GreaterOrEqual, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::greaterOrEqual, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa + (sizeof(TestCompareDataT) * 2), getAtomicOpcode(), @@ -761,7 +761,7 @@ void ConditionalBbStartTests::whenDispatchingLessModeThenResultsAreValidImpl( // Equal { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa, baseCompareValue, NEO::CompareOperation::Less, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa, baseCompareValue, NEO::CompareOperation::less, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa, getAtomicOpcode(), @@ -771,7 +771,7 @@ void ConditionalBbStartTests::whenDispatchingLessModeThenResultsAreValidImpl( // Greater { - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::Less, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, invalidGpuVa, baseGpuVa + sizeof(TestCompareDataT), baseCompareValue, NEO::CompareOperation::less, false, isQwordData); EncodeAtomic::programMiAtomic(*taskStream, baseWriteGpuVa + sizeof(TestCompareDataT), getAtomicOpcode(), @@ -783,7 +783,7 @@ void ConditionalBbStartTests::whenDispatchingLessModeThenResultsAreValidImpl( { uint64_t jumpAddress = taskStream->getCurrentGpuAddressPosition() + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(isQwordData) + EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); - EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::Less, false, isQwordData); + EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*taskStream, jumpAddress, baseGpuVa + (sizeof(TestCompareDataT) * 2), baseCompareValue, NEO::CompareOperation::less, false, isQwordData); NEO::EncodeBatchBufferStartOrEnd::programBatchBufferEnd(*taskStream); // should be skipped diff --git a/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h b/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h index 72f7ccc118..0c8aa1a827 100644 --- a/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h +++ b/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h @@ -46,7 +46,7 @@ struct BlitEnqueueTests : public ::testing::Test { auto mockBlitMemoryToAllocation = [this](const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> BlitOperationResult { if (!device.getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported) { - return BlitOperationResult::Unsupported; + return BlitOperationResult::unsupported; } auto blitProperties = BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection::hostPtrToBuffer, @@ -59,7 +59,7 @@ struct BlitEnqueueTests : public ::testing::Test { container.push_back(blitProperties); bcsCsr->flushBcsTask(container, true, false, const_cast(device)); - return BlitOperationResult::Success; + return BlitOperationResult::success; }; blitMemoryToAllocationFuncBackup = mockBlitMemoryToAllocation; } diff --git a/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp index c9f2771072..8b9da9eeb9 100644 --- a/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp @@ -314,37 +314,37 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenCheckIsSplitEnqueueBlit VariableBackup backup{&ultHwConfig}; ultHwConfig.useBlitSplit = true; { - EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_TRUE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); } { - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToHost, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToLocal, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToHost, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 64 * MemoryConstants::megaByte, cmdQHw->getGpgpuCommandStreamReceiver())); } { - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToHost, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToLocal, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToHost, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 4 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); } { debugManager.flags.SplitBcsCopy.set(0); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); } { debugManager.flags.SplitBcsCopy.set(-1); ultHwConfig.useBlitSplit = false; - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::localToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); } } @@ -356,11 +356,11 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsSizeSetWhenCheckIsSplitEnqueueB VariableBackup backup{&ultHwConfig}; ultHwConfig.useBlitSplit = true; { - EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 150 * MemoryConstants::kiloByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 150 * MemoryConstants::kiloByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); } { MockCommandQueueHw queue(this->pContext, this->pClDevice, nullptr); - EXPECT_TRUE(queue.isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 150 * MemoryConstants::kiloByte, *queue.getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); + EXPECT_TRUE(queue.isSplitEnqueueBlitNeeded(TransferDirection::hostToLocal, 150 * MemoryConstants::kiloByte, *queue.getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS))); EXPECT_EQ(queue.minimalSizeForBcsSplit, 100 * MemoryConstants::kiloByte); } } diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index c23c746472..4c7806bb0d 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -1982,7 +1982,7 @@ TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterAndAssignBCSAtEnque builtinOpParams.dstMemObj = &dstMemObj; CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr}; - args.direction = TransferDirection::LocalToHost; + args.direction = TransferDirection::localToHost; auto &csr = queue->selectCsrForBuiltinOperation(args); diff --git a/opencl/test/unit_test/command_queue/csr_selection_args_tests.cpp b/opencl/test/unit_test/command_queue/csr_selection_args_tests.cpp index 552b93cf5f..e606727d6c 100644 --- a/opencl/test/unit_test/command_queue/csr_selection_args_tests.cpp +++ b/opencl/test/unit_test/command_queue/csr_selection_args_tests.cpp @@ -26,7 +26,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation1.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_WRITE_BUFFER, {}, &buffer1, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_WRITE_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::HostToHost, args.direction); + EXPECT_EQ(TransferDirection::hostToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.dstResource.allocation); } @@ -34,7 +34,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation1.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_WRITE_BUFFER, {}, &buffer1, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_WRITE_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::HostToLocal, args.direction); + EXPECT_EQ(TransferDirection::hostToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.dstResource.allocation); } @@ -43,7 +43,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation1.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_READ_BUFFER, &buffer1, {}, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_READ_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToHost, args.direction); + EXPECT_EQ(TransferDirection::localToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); } @@ -51,7 +51,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation1.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_READ_BUFFER, &buffer1, {}, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_READ_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::HostToHost, args.direction); + EXPECT_EQ(TransferDirection::hostToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); } @@ -61,7 +61,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation2.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &buffer1, &buffer2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_COPY_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToHost, args.direction); + EXPECT_EQ(TransferDirection::localToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); @@ -71,7 +71,7 @@ TEST(CsrSelectionArgsTests, givenBuffersWhenCreatingCsrSelectionArgsThenSetupArg allocation2.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &buffer1, &buffer2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_COPY_BUFFER), args.cmdType); - EXPECT_EQ(TransferDirection::HostToLocal, args.direction); + EXPECT_EQ(TransferDirection::hostToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); @@ -93,7 +93,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation1.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_WRITE_IMAGE, {}, &image1, rootDeviceIndex, size, nullptr, origin1}; EXPECT_EQ(static_cast(CL_COMMAND_WRITE_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::HostToHost, args.direction); + EXPECT_EQ(TransferDirection::hostToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.dstResource.image); EXPECT_EQ(&allocation1, args.dstResource.allocation); @@ -103,7 +103,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation1.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_WRITE_IMAGE, {}, &image1, rootDeviceIndex, size, nullptr, origin1}; EXPECT_EQ(static_cast(CL_COMMAND_WRITE_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::HostToLocal, args.direction); + EXPECT_EQ(TransferDirection::hostToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.dstResource.image); EXPECT_EQ(&allocation1, args.dstResource.allocation); @@ -114,7 +114,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation1.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_READ_IMAGE, &image1, nullptr, rootDeviceIndex, size, origin1, nullptr}; EXPECT_EQ(static_cast(CL_COMMAND_READ_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::HostToHost, args.direction); + EXPECT_EQ(TransferDirection::hostToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.srcResource.image); EXPECT_EQ(&allocation1, args.srcResource.allocation); @@ -124,7 +124,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation1.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_READ_IMAGE, &image1, nullptr, rootDeviceIndex, size, origin1, nullptr}; EXPECT_EQ(static_cast(CL_COMMAND_READ_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToHost, args.direction); + EXPECT_EQ(TransferDirection::localToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.srcResource.image); EXPECT_EQ(&allocation1, args.srcResource.allocation); @@ -136,7 +136,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation2.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_COPY_IMAGE, &image1, &image2, rootDeviceIndex, size, origin1, origin2}; EXPECT_EQ(static_cast(CL_COMMAND_COPY_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::HostToLocal, args.direction); + EXPECT_EQ(TransferDirection::hostToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.srcResource.image); EXPECT_EQ(&allocation1, args.srcResource.allocation); @@ -150,7 +150,7 @@ TEST(CsrSelectionArgsTests, givenImagesWhenCreatingCsrSelectionArgsThenSetupArgs allocation2.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_COPY_IMAGE, &image1, &image2, rootDeviceIndex, size, origin1, origin2}; EXPECT_EQ(static_cast(CL_COMMAND_COPY_IMAGE), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToHost, args.direction); + EXPECT_EQ(TransferDirection::localToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&image1, args.srcResource.image); EXPECT_EQ(&allocation1, args.srcResource.allocation); @@ -175,7 +175,7 @@ TEST(CsrSelectionArgsTests, givenGraphicsAllocationsWhenCreatingCsrSelectionArgs allocation2.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &multiAlloc1, &multiAlloc2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_SVM_MEMCPY), args.cmdType); - EXPECT_EQ(TransferDirection::HostToHost, args.direction); + EXPECT_EQ(TransferDirection::hostToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); @@ -185,7 +185,7 @@ TEST(CsrSelectionArgsTests, givenGraphicsAllocationsWhenCreatingCsrSelectionArgs allocation2.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &multiAlloc1, &multiAlloc2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_SVM_MEMCPY), args.cmdType); - EXPECT_EQ(TransferDirection::HostToLocal, args.direction); + EXPECT_EQ(TransferDirection::hostToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); @@ -195,7 +195,7 @@ TEST(CsrSelectionArgsTests, givenGraphicsAllocationsWhenCreatingCsrSelectionArgs allocation2.memoryPool = MemoryPool::system4KBPages; CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &multiAlloc1, &multiAlloc2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_SVM_MEMCPY), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToHost, args.direction); + EXPECT_EQ(TransferDirection::localToHost, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); @@ -205,7 +205,7 @@ TEST(CsrSelectionArgsTests, givenGraphicsAllocationsWhenCreatingCsrSelectionArgs allocation2.memoryPool = MemoryPool::localMemory; CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &multiAlloc1, &multiAlloc2, rootDeviceIndex, size}; EXPECT_EQ(static_cast(CL_COMMAND_SVM_MEMCPY), args.cmdType); - EXPECT_EQ(TransferDirection::LocalToLocal, args.direction); + EXPECT_EQ(TransferDirection::localToLocal, args.direction); EXPECT_EQ(size, args.size); EXPECT_EQ(&allocation1, args.srcResource.allocation); EXPECT_EQ(&allocation2, args.dstResource.allocation); diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp index 9ee748505d..1fa4a51000 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp @@ -1171,7 +1171,7 @@ HWTEST2_F(RelaxedOrderingEnqueueKernelTests, givenEnqueueKernelWhenProgrammingDe auto eventNode = castToObject(outEvent)->getTimestampPacketNodes()->peekNodes()[0]; auto compareAddress = eventNode->getGpuAddress() + eventNode->getContextEndOffset(); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::Equal, true, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::equal, true, false)); mockCmdQueueHw.enqueueBarrierWithWaitList(1, &outEvent, nullptr); @@ -1269,10 +1269,10 @@ HWTEST2_F(RelaxedOrderingEnqueueKernelTests, givenBarrierWithDependenciesWhenFlu auto eventNode = castToObject(outEvent)->getTimestampPacketNodes()->peekNodes()[0]; auto compareAddress = eventNode->getGpuAddress() + eventNode->getContextEndOffset(); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::Equal, true, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::equal, true, false)); auto conditionalBbStart2 = reinterpret_cast(ptrOffset(lrrCmd, EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(false))); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(conditionalBbStart2, 0, compareAddress, 1, CompareOperation::Equal, true, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(conditionalBbStart2, 0, compareAddress, 1, CompareOperation::equal, true, false)); auto sdiCmd = genCmdCast(ptrOffset(conditionalBbStart2, EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart(false))); EXPECT_NE(nullptr, sdiCmd); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp index 5133de85b3..203a95b9de 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp @@ -1096,7 +1096,7 @@ HWTEST2_F(RelaxedOrderingBcsTests, givenDependenciesWhenFlushingThenProgramCorre auto eventNode = timestamp.peekNodes()[0]; auto compareAddress = eventNode->getGpuAddress() + eventNode->getContextEndOffset(); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::Equal, true, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart(++lrrCmd, 0, compareAddress, 1, CompareOperation::equal, true, false)); } HWTEST2_F(RelaxedOrderingBcsTests, givenDependenciesWhenFlushingThenProgramProgramRelaxedOrderingOnlyIfAllowed, IsAtLeastXeHpcCore) { diff --git a/opencl/test/unit_test/compiler_interface/cl_compiler_interface_tests.cpp b/opencl/test/unit_test/compiler_interface/cl_compiler_interface_tests.cpp index 4cf065b397..f2add335b5 100644 --- a/opencl/test/unit_test/compiler_interface/cl_compiler_interface_tests.cpp +++ b/opencl/test/unit_test/compiler_interface/cl_compiler_interface_tests.cpp @@ -70,7 +70,7 @@ TEST_F(ClCompilerInterfaceTest, WhenBuildIsInvokedThenFclReceivesListOfExtension gEnvironment->fclPushDebugVars(debugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_TRUE(hasSubstr(receivedInternalOptions, pClDevice->peekCompilerExtensions())); gEnvironment->fclPopDebugVars(); } @@ -84,7 +84,7 @@ TEST_F(ClCompilerInterfaceTest, WhenCompileIsInvokedThenFclReceivesListOfExtensi gEnvironment->fclPushDebugVars(fclDebugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_TRUE(hasSubstr(receivedInternalOptions, pClDevice->peekCompilerExtensions())); gEnvironment->fclPopDebugVars(); } diff --git a/opencl/test/unit_test/context/context_tests.cpp b/opencl/test/unit_test/context/context_tests.cpp index 4b7833c175..99c245508e 100644 --- a/opencl/test/unit_test/context/context_tests.cpp +++ b/opencl/test/unit_test/context/context_tests.cpp @@ -565,10 +565,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ContextCreateTests, givenLocalMemoryAllocationWhenB auto executionEnv = testedDevice->getExecutionEnvironment(); executionEnv->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = false; - EXPECT_EQ(BlitOperationResult::Unsupported, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); + EXPECT_EQ(BlitOperationResult::unsupported, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); executionEnv->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true; - EXPECT_EQ(BlitOperationResult::Success, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); + EXPECT_EQ(BlitOperationResult::success, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); } } @@ -596,7 +596,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ContextCreateTests, givenGpuHangOnFlushBcsTaskAndLo auto executionEnv = testedDevice->getExecutionEnvironment(); executionEnv->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = false; - EXPECT_EQ(BlitOperationResult::Unsupported, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); + EXPECT_EQ(BlitOperationResult::unsupported, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); executionEnv->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true; @@ -618,7 +618,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ContextCreateTests, givenGpuHangOnFlushBcsTaskAndLo ultBcsCsr->callBaseFlushBcsTask = false; ultBcsCsr->flushBcsTaskReturnValue = CompletionStamp::gpuHang; - EXPECT_EQ(BlitOperationResult::GpuHang, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); + EXPECT_EQ(BlitOperationResult::gpuHang, BlitHelper::blitMemoryToAllocation(buffer->getContext()->getDevice(0)->getDevice(), memory, buffer->getOffset(), hostMemory, {1, 1, 1})); } struct AllocationReuseContextTest : ContextTest { diff --git a/opencl/test/unit_test/helpers/task_information_tests.cpp b/opencl/test/unit_test/helpers/task_information_tests.cpp index d72d48f58e..63a40d7dfb 100644 --- a/opencl/test/unit_test/helpers/task_information_tests.cpp +++ b/opencl/test/unit_test/helpers/task_information_tests.cpp @@ -261,7 +261,7 @@ HWTEST_F(DispatchFlagsTests, givenCommandMapUnmapWhenSubmitThenPassCorrectDispat EXPECT_FALSE(mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); + EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::low, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); EXPECT_FALSE(mockCsr->passedDispatchFlags.epilogueRequired); @@ -304,7 +304,7 @@ HWTEST_F(DispatchFlagsTests, givenCommandComputeKernelWhenSubmitThenPassCorrectD EXPECT_EQ(slmUsed, mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_EQ(ndRangeKernel, mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); + EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::low, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); EXPECT_FALSE(mockCsr->passedDispatchFlags.epilogueRequired); @@ -348,7 +348,7 @@ HWTEST_F(DispatchFlagsTests, givenClCommandCopyImageWhenSubmitThenFlushTextureCa EXPECT_EQ(slmUsed, mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); + EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::low, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); EXPECT_FALSE(mockCsr->passedDispatchFlags.epilogueRequired); @@ -387,7 +387,7 @@ HWTEST_F(DispatchFlagsTests, givenCommandWithoutKernelWhenSubmitThenPassCorrectD EXPECT_FALSE(mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); + EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::low, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); EXPECT_FALSE(mockCsr->passedDispatchFlags.epilogueRequired); diff --git a/opencl/test/unit_test/kernel/kernel_tests.cpp b/opencl/test/unit_test/kernel/kernel_tests.cpp index 100c6d245c..39a05d99d2 100644 --- a/opencl/test/unit_test/kernel/kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_tests.cpp @@ -1965,21 +1965,21 @@ HWTEST_F(KernelResidencyTest, givenEnableFullKernelTuningWhenPerformTunningThenK result = mockKernel.mockKernel->kernelSubmissionMap.find(config); EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::STANDARD_TUNNING_IN_PROGRESS); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::standardTunningInProgress); EXPECT_FALSE(mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); mockKernel.mockKernel->performKernelTuning(commandStreamReceiver, lws, gws, offsets, &subdeviceContainer); result = mockKernel.mockKernel->kernelSubmissionMap.find(config); EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::subdeviceTunningInProgress); EXPECT_TRUE(mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); mockKernel.mockKernel->performKernelTuning(commandStreamReceiver, lws, gws, offsets, &container); result = mockKernel.mockKernel->kernelSubmissionMap.find(config); EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::subdeviceTunningInProgress); EXPECT_FALSE(mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); TimestampPacketType data[4] = {static_cast(container.getNode(0u)->getContextStartValue(0)), @@ -1992,7 +1992,7 @@ HWTEST_F(KernelResidencyTest, givenEnableFullKernelTuningWhenPerformTunningThenK result = mockKernel.mockKernel->kernelSubmissionMap.find(config); EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::subdeviceTunningInProgress); EXPECT_FALSE(mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); data[0] = static_cast(subdeviceContainer.getNode(0u)->getContextStartValue(0)); @@ -2008,7 +2008,7 @@ HWTEST_F(KernelResidencyTest, givenEnableFullKernelTuningWhenPerformTunningThenK EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); EXPECT_NE(result->second.kernelStandardTimestamps.get(), nullptr); EXPECT_NE(result->second.kernelSubdeviceTimestamps.get(), nullptr); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::SUBDEVICE_TUNNING_IN_PROGRESS); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::subdeviceTunningInProgress); EXPECT_FALSE(mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); data[0] = static_cast(subdeviceContainer.getNode(1u)->getContextStartValue(0)); @@ -2024,13 +2024,13 @@ HWTEST_F(KernelResidencyTest, givenEnableFullKernelTuningWhenPerformTunningThenK EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); EXPECT_EQ(result->second.kernelStandardTimestamps.get(), nullptr); EXPECT_EQ(result->second.kernelSubdeviceTimestamps.get(), nullptr); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::TUNNING_DONE); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::tunningDone); EXPECT_EQ(result->second.singleSubdevicePreferred, mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); mockKernel.mockKernel->performKernelTuning(commandStreamReceiver, lws, gws, offsets, &container); result = mockKernel.mockKernel->kernelSubmissionMap.find(config); EXPECT_NE(result, mockKernel.mockKernel->kernelSubmissionMap.end()); - EXPECT_EQ(result->second.status, MockKernel::TunningStatus::TUNNING_DONE); + EXPECT_EQ(result->second.status, MockKernel::TunningStatus::tunningDone); EXPECT_EQ(result->second.singleSubdevicePreferred, mockKernel.mockKernel->singleSubdevicePreferredInCurrentEnqueue); } diff --git a/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp b/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp index 458830778e..75d1a3d06d 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp @@ -121,7 +121,7 @@ HWTEST2_F(PvcAndLaterBufferTests, givenCompressedBufferInSystemAndBlitterSupport blitMemoryToAllocationFuncBackup = [](const NEO::Device &device, NEO::GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> NEO::BlitOperationResult { ADD_FAILURE(); - return BlitOperationResult::Fail; + return BlitOperationResult::fail; }; cl_mem_flags flags = CL_MEM_COPY_HOST_PTR | CL_MEM_COMPRESSED_HINT_INTEL; uint32_t hostPtr = 0; diff --git a/opencl/test/unit_test/mocks/mock_context.cpp b/opencl/test/unit_test/mocks/mock_context.cpp index f2df939898..d12a1f3cb8 100644 --- a/opencl/test/unit_test/mocks/mock_context.cpp +++ b/opencl/test/unit_test/mocks/mock_context.cpp @@ -195,7 +195,7 @@ BcsMockContext::BcsMockContext(ClDevice *device) : MockContext(device) { container.push_back(blitProperties); bcsCsr->flushBcsTask(container, true, false, const_cast(device)); - return BlitOperationResult::Success; + return BlitOperationResult::success; }; blitMemoryToAllocationFuncBackup = mockBlitMemoryToAllocation; } diff --git a/opencl/test/unit_test/program/printf_handler_tests.cpp b/opencl/test/unit_test/program/printf_handler_tests.cpp index 81eaf4b2b6..04810f9dcd 100644 --- a/opencl/test/unit_test/program/printf_handler_tests.cpp +++ b/opencl/test/unit_test/program/printf_handler_tests.cpp @@ -345,7 +345,7 @@ TEST_F(PrintfHandlerTests, GivenAllocationInLocalMemoryWhichRequiresBlitterWhenP auto mockBlitMemoryToAllocation = [&blitsCounter](const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> BlitOperationResult { blitsCounter++; - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup{ &BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation}; diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index c010b17d6d..97f54c1aee 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -2930,7 +2930,7 @@ struct SpecializationConstantProgramMock : public MockProgram { }; struct SpecializationConstantCompilerInterfaceMock : public CompilerInterface { - TranslationOutput::ErrorCode retVal = TranslationOutput::ErrorCode::Success; + TranslationOutput::ErrorCode retVal = TranslationOutput::ErrorCode::success; int counter = 0; const char *spirV = nullptr; TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device, ArrayRef srcSpirV, SpecConstantInfo &output) override { @@ -2939,7 +2939,7 @@ struct SpecializationConstantCompilerInterfaceMock : public CompilerInterface { return retVal; } void returnError() { - retVal = TranslationOutput::ErrorCode::CompilationFailure; + retVal = TranslationOutput::ErrorCode::compilationFailure; } }; diff --git a/shared/source/built_ins/built_ins.cpp b/shared/source/built_ins/built_ins.cpp index 1d6282ba1e..5752e38b58 100644 --- a/shared/source/built_ins/built_ins.cpp +++ b/shared/source/built_ins/built_ins.cpp @@ -41,7 +41,7 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) { auto ret = compilerInterface->getSipKernelBinary(device, type, sipBinary, stateSaveAreaHeader); - UNRECOVERABLE_IF(ret != TranslationOutput::ErrorCode::Success); + UNRECOVERABLE_IF(ret != TranslationOutput::ErrorCode::success); UNRECOVERABLE_IF(sipBinary.size() == 0); const auto allocType = AllocationType::kernelIsaInternal; diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index a41e77c1eb..05c2c37e59 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -83,10 +83,10 @@ enum class MiPredicateType : uint32_t { }; enum class CompareOperation : uint32_t { - Equal = 0, - NotEqual = 1, - GreaterOrEqual = 2, - Less = 3, + equal = 0, + notEqual = 1, + greaterOrEqual = 2, + less = 3, }; struct EncodeWalkerArgs { @@ -281,8 +281,8 @@ struct EncodeMathMMIO { protected: enum class IncrementOrDecrementOperation { - Increment = 0, - Decrement = 1, + increment = 0, + decrement = 1, }; static void encodeIncrementOrDecrement(LinearStream &cmdStream, AluRegisters operandRegister, IncrementOrDecrementOperation operationType); diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 974c617d42..e89f814e1b 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -111,12 +111,12 @@ void EncodeMathMMIO::encodeMulRegVal(CommandContainer &container, uint32 i = 0; while (i < logLws) { if (val & (1 << i)) { - EncodeMath::addition(container, AluRegisters::R_1, - AluRegisters::R_0, AluRegisters::R_2); + EncodeMath::addition(container, AluRegisters::gpr1, + AluRegisters::gpr0, AluRegisters::gpr2); EncodeSetMMIO::encodeREG(container, RegisterOffsets::csGprR1, RegisterOffsets::csGprR2); } - EncodeMath::addition(container, AluRegisters::R_0, - AluRegisters::R_0, AluRegisters::R_2); + EncodeMath::addition(container, AluRegisters::gpr0, + AluRegisters::gpr0, AluRegisters::gpr2); EncodeSetMMIO::encodeREG(container, RegisterOffsets::csGprR0, RegisterOffsets::csGprR2); i++; } @@ -136,9 +136,9 @@ void EncodeMathMMIO::encodeGreaterThanPredicate(CommandContainer &contai EncodeSetMMIO::encodeMEM(container, RegisterOffsets::csGprR0, firstOperand); EncodeSetMMIO::encodeIMM(container, RegisterOffsets::csGprR1, secondOperand, true); - /* RegisterOffsets::csGprR* registers map to AluRegisters::R_* registers */ - EncodeMath::greaterThan(container, AluRegisters::R_0, - AluRegisters::R_1, AluRegisters::R_2); + /* RegisterOffsets::csGprR* registers map to AluRegisters::gpr* registers */ + EncodeMath::greaterThan(container, AluRegisters::gpr0, + AluRegisters::gpr1, AluRegisters::gpr2); EncodeSetMMIO::encodeREG(container, RegisterOffsets::csPredicateResult, RegisterOffsets::csGprR2); } @@ -152,9 +152,9 @@ void EncodeMathMMIO::encodeBitwiseAndVal(CommandContainer &container, ui bool workloadPartition) { EncodeSetMMIO::encodeREG(container, RegisterOffsets::csGprR13, regOffset); EncodeSetMMIO::encodeIMM(container, RegisterOffsets::csGprR14, immVal, true); - EncodeMath::bitwiseAnd(container, AluRegisters::R_13, - AluRegisters::R_14, - AluRegisters::R_15); + EncodeMath::bitwiseAnd(container, AluRegisters::gpr13, + AluRegisters::gpr14, + AluRegisters::gpr15); EncodeStoreMMIO::encode(*container.getCommandStream(), RegisterOffsets::csGprR15, dstAddress, workloadPartition); } @@ -175,15 +175,15 @@ void EncodeMathMMIO::encodeAlu(MI_MATH_ALU_INST_INLINE *pAluParam, AluRe MI_MATH_ALU_INST_INLINE aluParam; aluParam.DW0.Value = 0x0; - aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); - aluParam.DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCA); + aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); + aluParam.DW0.BitField.Operand1 = static_cast(AluRegisters::srca); aluParam.DW0.BitField.Operand2 = static_cast(srcA); *pAluParam = aluParam; pAluParam++; aluParam.DW0.Value = 0x0; - aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_LOAD); - aluParam.DW0.BitField.Operand1 = static_cast(AluRegisters::R_SRCB); + aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeLoad); + aluParam.DW0.BitField.Operand1 = static_cast(AluRegisters::srcb); aluParam.DW0.BitField.Operand2 = static_cast(srcB); *pAluParam = aluParam; pAluParam++; @@ -197,7 +197,7 @@ void EncodeMathMMIO::encodeAlu(MI_MATH_ALU_INST_INLINE *pAluParam, AluRe pAluParam++; aluParam.DW0.Value = 0x0; - aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::OPCODE_STORE); + aluParam.DW0.BitField.ALUOpcode = static_cast(AluRegisters::opcodeStore); aluParam.DW0.BitField.Operand1 = static_cast(finalResultRegister); aluParam.DW0.BitField.Operand2 = static_cast(postOperationStateRegister); *pAluParam = aluParam; @@ -230,13 +230,13 @@ void EncodeMathMMIO::encodeAluAdd(MI_MATH_ALU_INST_INLINE *pAluParam, AluRegisters firstOperandRegister, AluRegisters secondOperandRegister, AluRegisters finalResultRegister) { - encodeAlu(pAluParam, firstOperandRegister, secondOperandRegister, AluRegisters::OPCODE_ADD, finalResultRegister, AluRegisters::R_ACCU); + encodeAlu(pAluParam, firstOperandRegister, secondOperandRegister, AluRegisters::opcodeAdd, finalResultRegister, AluRegisters::accu); } template void EncodeMathMMIO::encodeAluSubStoreCarry(MI_MATH_ALU_INST_INLINE *pAluParam, AluRegisters regA, AluRegisters regB, AluRegisters finalResultRegister) { /* regB is subtracted from regA */ - encodeAlu(pAluParam, regA, regB, AluRegisters::OPCODE_SUB, finalResultRegister, AluRegisters::R_CF); + encodeAlu(pAluParam, regA, regB, AluRegisters::opcodeSub, finalResultRegister, AluRegisters::cf); } template @@ -244,7 +244,7 @@ void EncodeMathMMIO::encodeAluAnd(MI_MATH_ALU_INST_INLINE *pAluParam, AluRegisters firstOperandRegister, AluRegisters secondOperandRegister, AluRegisters finalResultRegister) { - encodeAlu(pAluParam, firstOperandRegister, secondOperandRegister, AluRegisters::OPCODE_AND, finalResultRegister, AluRegisters::R_ACCU); + encodeAlu(pAluParam, firstOperandRegister, secondOperandRegister, AluRegisters::opcodeAnd, finalResultRegister, AluRegisters::accu); } template @@ -253,23 +253,23 @@ void EncodeMathMMIO::encodeIncrementOrDecrement(LinearStream &cmdStream, LriHelper::program(&cmdStream, RegisterOffsets::csGprR7 + 4, 0, true); EncodeAluHelper aluHelper; - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, operandRegister); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_7); - aluHelper.setNextAlu((operationType == IncrementOrDecrementOperation::Increment) ? AluRegisters::OPCODE_ADD - : AluRegisters::OPCODE_SUB); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, operandRegister, AluRegisters::R_ACCU); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, operandRegister); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr7); + aluHelper.setNextAlu((operationType == IncrementOrDecrementOperation::increment) ? AluRegisters::opcodeAdd + : AluRegisters::opcodeSub); + aluHelper.setNextAlu(AluRegisters::opcodeStore, operandRegister, AluRegisters::accu); aluHelper.copyToCmdStream(cmdStream); } template void EncodeMathMMIO::encodeIncrement(LinearStream &cmdStream, AluRegisters operandRegister) { - encodeIncrementOrDecrement(cmdStream, operandRegister, IncrementOrDecrementOperation::Increment); + encodeIncrementOrDecrement(cmdStream, operandRegister, IncrementOrDecrementOperation::increment); } template void EncodeMathMMIO::encodeDecrement(LinearStream &cmdStream, AluRegisters operandRegister) { - encodeIncrementOrDecrement(cmdStream, operandRegister, IncrementOrDecrementOperation::Decrement); + encodeIncrementOrDecrement(cmdStream, operandRegister, IncrementOrDecrementOperation::decrement); } /* @@ -614,7 +614,7 @@ void EncodeIndirectParams::setWorkDimIndirect(CommandContainer &containe if (NEO::isValidOffset(workDimOffset)) { auto dstPtr = ptrOffset(crossThreadAddress, workDimOffset); constexpr uint32_t resultRegister = RegisterOffsets::csGprR0; - constexpr AluRegisters resultAluRegister = AluRegisters::R_0; + constexpr AluRegisters resultAluRegister = AluRegisters::gpr0; const uint32_t offset = static_cast((1ull << 8 * (dstPtr & 0b11)) - 1); const uint32_t memoryMask = std::numeric_limits::max() - static_cast((1ull << 8 * ((dstPtr & 0b11) + 1)) - 1) + offset; @@ -629,33 +629,33 @@ void EncodeIndirectParams::setWorkDimIndirect(CommandContainer &containe } else { constexpr uint32_t groupCount2Register = RegisterOffsets::csGprR1; - constexpr AluRegisters groupCount2AluRegister = AluRegisters::R_1; + constexpr AluRegisters groupCount2AluRegister = AluRegisters::gpr1; constexpr uint32_t groupSize1Register = RegisterOffsets::csGprR0; - constexpr AluRegisters groupSize1AluRegister = AluRegisters::R_0; + constexpr AluRegisters groupSize1AluRegister = AluRegisters::gpr0; constexpr uint32_t groupCount1Register = RegisterOffsets::csGprR1; - constexpr AluRegisters groupCount1AluRegister = AluRegisters::R_1; + constexpr AluRegisters groupCount1AluRegister = AluRegisters::gpr1; - constexpr AluRegisters sumAluRegister = AluRegisters::R_0; + constexpr AluRegisters sumAluRegister = AluRegisters::gpr0; - constexpr AluRegisters workDimEq3AluRegister = AluRegisters::R_3; + constexpr AluRegisters workDimEq3AluRegister = AluRegisters::gpr3; - constexpr AluRegisters workDimGe2AluRegister = AluRegisters::R_4; + constexpr AluRegisters workDimGe2AluRegister = AluRegisters::gpr4; constexpr uint32_t constantOneRegister = RegisterOffsets::csGprR5; - constexpr AluRegisters constantOneAluRegister = AluRegisters::R_5; + constexpr AluRegisters constantOneAluRegister = AluRegisters::gpr5; constexpr uint32_t constantTwoRegister = RegisterOffsets::csGprR6; - constexpr AluRegisters constantTwoAluRegister = AluRegisters::R_6; + constexpr AluRegisters constantTwoAluRegister = AluRegisters::gpr6; constexpr uint32_t backupRegister = RegisterOffsets::csGprR7; - constexpr AluRegisters backupAluRegister = AluRegisters::R_7; + constexpr AluRegisters backupAluRegister = AluRegisters::gpr7; constexpr uint32_t memoryMaskRegister = RegisterOffsets::csGprR8; - constexpr AluRegisters memoryMaskAluRegister = AluRegisters::R_8; + constexpr AluRegisters memoryMaskAluRegister = AluRegisters::gpr8; constexpr uint32_t offsetRegister = RegisterOffsets::csGprR8; - constexpr AluRegisters offsetAluRegister = AluRegisters::R_8; + constexpr AluRegisters offsetAluRegister = AluRegisters::gpr8; if (offset) { EncodeSetMMIO::encodeMEM(container, backupRegister, dstPtr); @@ -877,7 +877,7 @@ void EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferSt LriHelper::program(&commandStream, RegisterOffsets::csGprR8, compareDataLow, true); LriHelper::program(&commandStream, RegisterOffsets::csGprR8 + 4, compareDataHigh, true); - programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::R_7, AluRegisters::R_8, compareOperation, indirect); + programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::gpr7, AluRegisters::gpr8, compareOperation, indirect); } template @@ -896,7 +896,7 @@ void EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferSt LriHelper::program(&commandStream, RegisterOffsets::csGprR8, compareDataLow, true); LriHelper::program(&commandStream, RegisterOffsets::csGprR8 + 4, compareDataHigh, true); - programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::R_7, AluRegisters::R_8, compareOperation, indirect); + programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::gpr7, AluRegisters::gpr8, compareOperation, indirect); } template @@ -915,21 +915,21 @@ void EncodeBatchBufferStartOrEnd::programConditionalRegMemBatchBufferSta EncodeSetMMIO::encodeREG(commandStream, RegisterOffsets::csGprR8, compareReg); LriHelper::program(&commandStream, RegisterOffsets::csGprR8 + 4, 0, true); - programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::R_7, AluRegisters::R_8, compareOperation, indirect); + programConditionalBatchBufferStartBase(commandStream, startAddress, AluRegisters::gpr7, AluRegisters::gpr8, compareOperation, indirect); } template void EncodeBatchBufferStartOrEnd::programConditionalBatchBufferStartBase(LinearStream &commandStream, uint64_t startAddress, AluRegisters regA, AluRegisters regB, CompareOperation compareOperation, bool indirect) { EncodeAluHelper aluHelper; - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, regA); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, regB); - aluHelper.setNextAlu(AluRegisters::OPCODE_SUB); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, regA); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, regB); + aluHelper.setNextAlu(AluRegisters::opcodeSub); - if ((compareOperation == CompareOperation::Equal) || (compareOperation == CompareOperation::NotEqual)) { - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ZF); - } else if ((compareOperation == CompareOperation::GreaterOrEqual) || (compareOperation == CompareOperation::Less)) { - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_CF); + if ((compareOperation == CompareOperation::equal) || (compareOperation == CompareOperation::notEqual)) { + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::zf); + } else if ((compareOperation == CompareOperation::greaterOrEqual) || (compareOperation == CompareOperation::less)) { + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::cf); } else { UNRECOVERABLE_IF(true); } @@ -939,7 +939,7 @@ void EncodeBatchBufferStartOrEnd::programConditionalBatchBufferStartBase EncodeSetMMIO::encodeREG(commandStream, RegisterOffsets::csPredicateResult2, RegisterOffsets::csGprR7); MiPredicateType predicateType = MiPredicateType::noopOnResult2Clear; // Equal or Less - if ((compareOperation == CompareOperation::NotEqual) || (compareOperation == CompareOperation::GreaterOrEqual)) { + if ((compareOperation == CompareOperation::notEqual) || (compareOperation == CompareOperation::greaterOrEqual)) { predicateType = MiPredicateType::noopOnResult2Set; } diff --git a/shared/source/command_container/encode_alu_helper.h b/shared/source/command_container/encode_alu_helper.h index 8cb02b3762..8e2e1cefee 100644 --- a/shared/source/command_container/encode_alu_helper.h +++ b/shared/source/command_container/encode_alu_helper.h @@ -31,7 +31,7 @@ class EncodeAluHelper { } void setNextAlu(AluRegisters opcode) { - setNextAlu(opcode, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE); + setNextAlu(opcode, AluRegisters::opcodeNone, AluRegisters::opcodeNone); } void setNextAlu(AluRegisters opcode, AluRegisters operand1, AluRegisters operand2) { diff --git a/shared/source/command_stream/transfer_direction.h b/shared/source/command_stream/transfer_direction.h index 9343b7b976..0dc9098d89 100644 --- a/shared/source/command_stream/transfer_direction.h +++ b/shared/source/command_stream/transfer_direction.h @@ -9,25 +9,25 @@ namespace NEO { enum class TransferDirection { - HostToHost, - HostToLocal, - LocalToHost, - LocalToLocal, + hostToHost, + hostToLocal, + localToHost, + localToLocal, }; inline TransferDirection createTransferDirection(bool srcLocal, bool dstLocal) { if (srcLocal) { if (dstLocal) { - return TransferDirection::LocalToLocal; + return TransferDirection::localToLocal; } else { - return TransferDirection::LocalToHost; + return TransferDirection::localToHost; } } else { if (dstLocal) { - return TransferDirection::HostToLocal; + return TransferDirection::hostToLocal; } else { - return TransferDirection::HostToHost; + return TransferDirection::hostToHost; } } } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/compiler_interface/compiler_interface.cpp b/shared/source/compiler_interface/compiler_interface.cpp index 45bafabfc0..38dc7c04f4 100644 --- a/shared/source/compiler_interface/compiler_interface.cpp +++ b/shared/source/compiler_interface/compiler_interface.cpp @@ -59,7 +59,7 @@ TranslationOutput::ErrorCode CompilerInterface::build( const TranslationInput &input, TranslationOutput &output) { if (false == isCompilerAvailable(input.srcType, input.outType)) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } IGC::CodeType::CodeType_t srcCodeType = input.srcType; @@ -87,7 +87,7 @@ TranslationOutput::ErrorCode CompilerInterface::build( input.internalOptions, ArrayRef(), ArrayRef(), igcRevision, igcLibSize, igcLibMTime); output.deviceBinary.mem = cache->loadCachedBinary(kernelFileHash, output.deviceBinary.size); if (output.deviceBinary.mem) { - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } } @@ -114,13 +114,13 @@ TranslationOutput::ErrorCode CompilerInterface::build( fclOptions.get(), fclInternalOptions.get()); if (fclOutput == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } TranslationOutput::makeCopy(output.frontendCompilerLog, fclOutput->GetBuildLog()); if (fclOutput->Successful() == false) { - return TranslationOutput::ErrorCode::BuildFailure; + return TranslationOutput::ErrorCode::buildFailure; } output.intermediateCodeType = intermediateCodeType; @@ -143,7 +143,7 @@ TranslationOutput::ErrorCode CompilerInterface::build( input.internalOptions, specIdsRef, specValuesRef, igcRevision, igcLibSize, igcLibMTime); output.deviceBinary.mem = cache->loadCachedBinary(kernelFileHash, output.deviceBinary.size); if (output.deviceBinary.mem) { - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } } @@ -153,13 +153,13 @@ TranslationOutput::ErrorCode CompilerInterface::build( fclOptions.get(), fclInternalOptions.get(), input.gtPinInput); if (igcOutput == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } TranslationOutput::makeCopy(output.backendCompilerLog, igcOutput->GetBuildLog()); if (igcOutput->Successful() == false) { - return TranslationOutput::ErrorCode::BuildFailure; + return TranslationOutput::ErrorCode::buildFailure; } if (cache != nullptr && cache->getConfig().enabled) { @@ -169,7 +169,7 @@ TranslationOutput::ErrorCode CompilerInterface::build( TranslationOutput::makeCopy(output.deviceBinary, igcOutput->GetOutput()); TranslationOutput::makeCopy(output.debugData, igcOutput->GetDebugData()); - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode CompilerInterface::compile( @@ -178,11 +178,11 @@ TranslationOutput::ErrorCode CompilerInterface::compile( TranslationOutput &output) { if ((IGC::CodeType::oclC != input.srcType) && (IGC::CodeType::elf != input.srcType)) { - return TranslationOutput::ErrorCode::AlreadyCompiled; + return TranslationOutput::ErrorCode::alreadyCompiled; } if (false == isCompilerAvailable(input.srcType, input.outType)) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } auto outType = input.outType; @@ -201,19 +201,19 @@ TranslationOutput::ErrorCode CompilerInterface::compile( fclOptions.get(), fclInternalOptions.get()); if (fclOutput == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } TranslationOutput::makeCopy(output.frontendCompilerLog, fclOutput->GetBuildLog()); if (fclOutput->Successful() == false) { - return TranslationOutput::ErrorCode::CompilationFailure; + return TranslationOutput::ErrorCode::compilationFailure; } output.intermediateCodeType = outType; TranslationOutput::makeCopy(output.intermediateRepresentation, fclOutput->GetOutput()); - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode CompilerInterface::link( @@ -221,7 +221,7 @@ TranslationOutput::ErrorCode CompilerInterface::link( const TranslationInput &input, TranslationOutput &output) { if (false == isCompilerAvailable(input.srcType, input.outType)) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } auto inSrc = CIF::Builtins::CreateConstBuffer(igcMain.get(), input.src.begin(), input.src.size()); @@ -229,7 +229,7 @@ TranslationOutput::ErrorCode CompilerInterface::link( auto igcInternalOptions = CIF::Builtins::CreateConstBuffer(igcMain.get(), input.internalOptions.begin(), input.internalOptions.size()); if (inSrc == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } CIF::RAII::UPtr_t currOut; @@ -246,12 +246,12 @@ TranslationOutput::ErrorCode CompilerInterface::link( igcOptions.get(), igcInternalOptions.get(), input.gtPinInput); if (currOut == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } if (currOut->Successful() == false) { TranslationOutput::makeCopy(output.backendCompilerLog, currOut->GetBuildLog()); - return TranslationOutput::ErrorCode::LinkFailure; + return TranslationOutput::ErrorCode::linkFailure; } currOut->GetOutput()->Retain(); // shared with currSrc @@ -262,12 +262,12 @@ TranslationOutput::ErrorCode CompilerInterface::link( TranslationOutput::makeCopy(output.deviceBinary, currOut->GetOutput()); TranslationOutput::makeCopy(output.debugData, currOut->GetDebugData()); - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode CompilerInterface::getSpecConstantsInfo(const NEO::Device &device, ArrayRef srcSpirV, SpecConstantInfo &output) { if (false == isIgcAvailable()) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } auto igcTranslationCtx = createIgcTranslationCtx(device, IGC::CodeType::spirV, IGC::CodeType::oclGenBin); @@ -279,10 +279,10 @@ TranslationOutput::ErrorCode CompilerInterface::getSpecConstantsInfo(const NEO:: auto retVal = getSpecConstantsInfoImpl(igcTranslationCtx.get(), inSrc.get(), output.idsBuffer.get(), output.sizesBuffer.get()); if (!retVal) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode CompilerInterface::createLibrary( @@ -290,7 +290,7 @@ TranslationOutput::ErrorCode CompilerInterface::createLibrary( const TranslationInput &input, TranslationOutput &output) { if (false == isIgcAvailable()) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } auto igcSrc = CIF::Builtins::CreateConstBuffer(igcMain.get(), input.src.begin(), input.src.size()); @@ -304,25 +304,25 @@ TranslationOutput::ErrorCode CompilerInterface::createLibrary( igcOptions.get(), igcInternalOptions.get()); if (igcOutput == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } TranslationOutput::makeCopy(output.backendCompilerLog, igcOutput->GetBuildLog()); if (igcOutput->Successful() == false) { - return TranslationOutput::ErrorCode::LinkFailure; + return TranslationOutput::ErrorCode::linkFailure; } output.intermediateCodeType = intermediateRepresentation; TranslationOutput::makeCopy(output.intermediateRepresentation, igcOutput->GetOutput()); - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device &device, SipKernelType type, std::vector &retBinary, std::vector &stateSaveAreaHeader) { if (false == isIgcAvailable()) { - return TranslationOutput::ErrorCode::CompilerNotAvailable; + return TranslationOutput::ErrorCode::compilerNotAvailable; } bool bindlessSip = false; @@ -348,7 +348,7 @@ TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device & auto deviceCtx = getIgcDeviceCtx(device); if (deviceCtx == nullptr) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } auto systemRoutineBuffer = igcMain->CreateBuiltin(); @@ -360,13 +360,13 @@ TranslationOutput::ErrorCode CompilerInterface::getSipKernelBinary(NEO::Device & stateSaveAreaBuffer.get()); if (!result) { - return TranslationOutput::ErrorCode::UnknownError; + return TranslationOutput::ErrorCode::unknownError; } retBinary.assign(systemRoutineBuffer->GetMemory(), systemRoutineBuffer->GetMemory() + systemRoutineBuffer->GetSizeRaw()); stateSaveAreaHeader.assign(stateSaveAreaBuffer->GetMemory(), stateSaveAreaBuffer->GetMemory() + stateSaveAreaBuffer->GetSizeRaw()); - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } CIF::RAII::UPtr_t CompilerInterface::getIgcFeaturesAndWorkarounds(NEO::Device const &device) { diff --git a/shared/source/compiler_interface/compiler_interface.h b/shared/source/compiler_interface/compiler_interface.h index 5a22e038a2..2f1e9e61fe 100644 --- a/shared/source/compiler_interface/compiler_interface.h +++ b/shared/source/compiler_interface/compiler_interface.h @@ -47,13 +47,13 @@ struct TranslationInput { struct TranslationOutput { enum class ErrorCode { - Success = 0, - CompilerNotAvailable, - CompilationFailure, - BuildFailure, - LinkFailure, - AlreadyCompiled, - UnknownError, + success = 0, + compilerNotAvailable, + compilationFailure, + buildFailure, + linkFailure, + alreadyCompiled, + unknownError, }; struct MemAndSize { diff --git a/shared/source/compiler_interface/linker.cpp b/shared/source/compiler_interface/linker.cpp index d07c16812a..d2c87d0aad 100644 --- a/shared/source/compiler_interface/linker.cpp +++ b/shared/source/compiler_interface/linker.cpp @@ -319,7 +319,7 @@ LinkingStatus Linker::link(const SegmentInfo &globalVariablesSegInfo, const Segm auto initialUnresolvedExternalsCount = outUnresolvedExternals.size(); success = success && relocateSymbols(globalVariablesSegInfo, globalConstantsSegInfo, exportedFunctionsSegInfo, globalStringsSegInfo, instructionsSegments, constantsInitDataSize, variablesInitDataSize); if (!success) { - return LinkingStatus::Error; + return LinkingStatus::error; } patchInstructionsSegments(instructionsSegments, outUnresolvedExternals, kernelDescriptors); patchDataSegments(globalVariablesSegInfo, globalConstantsSegInfo, globalVariablesSeg, globalConstantsSeg, @@ -329,13 +329,13 @@ LinkingStatus Linker::link(const SegmentInfo &globalVariablesSegInfo, const Segm resolveBuiltins(pDevice, outUnresolvedExternals, instructionsSegments); if (initialUnresolvedExternalsCount < outUnresolvedExternals.size()) { - return LinkingStatus::LinkedPartially; + return LinkingStatus::linkedPartially; } success = resolveExternalFunctions(kernelDescriptors, externalFunctions); if (!success) { - return LinkingStatus::Error; + return LinkingStatus::error; } - return LinkingStatus::LinkedFully; + return LinkingStatus::linkedFully; } bool Linker::relocateSymbols(const SegmentInfo &globalVariables, const SegmentInfo &globalConstants, const SegmentInfo &exportedFunctions, const SegmentInfo &globalStrings, @@ -603,9 +603,9 @@ void Linker::applyDebugDataRelocations(const NEO::Elf::Elfoffset; auto relocLocation = reinterpret_cast(inputOutputElf.begin()) + targetSectionOffset + reloc.offset; - if (static_cast(reloc.relocType) == Elf::RELOCATION_X8664_TYPE::R_X8664_64) { + if (static_cast(reloc.relocType) == Elf::RELOCATION_X8664_TYPE::relocation64) { *reinterpret_cast(relocLocation) = symbolAddress; - } else if (static_cast(reloc.relocType) == Elf::RELOCATION_X8664_TYPE::R_X8664_32) { + } else if (static_cast(reloc.relocType) == Elf::RELOCATION_X8664_TYPE::relocation32) { *reinterpret_cast(relocLocation) = static_cast(symbolAddress & uint32_t(-1)); } } diff --git a/shared/source/compiler_interface/linker.h b/shared/source/compiler_interface/linker.h index cb729f5706..75bffdec5b 100644 --- a/shared/source/compiler_interface/linker.h +++ b/shared/source/compiler_interface/linker.h @@ -37,9 +37,9 @@ enum class SegmentType : uint32_t { }; enum class LinkingStatus : uint32_t { - Error, - LinkedFully, - LinkedPartially + error, + linkedFully, + linkedPartially }; inline const char *asString(SegmentType segment) { diff --git a/shared/source/debugger/debugger_l0_tgllp_and_later.inl b/shared/source/debugger/debugger_l0_tgllp_and_later.inl index dae3ad3fb5..0fac6b97e6 100644 --- a/shared/source/debugger/debugger_l0_tgllp_and_later.inl +++ b/shared/source/debugger/debugger_l0_tgllp_and_later.inl @@ -79,7 +79,7 @@ void DebuggerL0Hw::programSbaTrackingCommandsSingleAddressSpace(NEO:: // Store SBA field offset to R0 NEO::EncodeSetMMIO::encodeIMM(cmdStream, RegisterOffsets::csGprR0, static_cast(pair.first), true); // Add GPR0 to GPR15, store result in GPR1 - NEO::EncodeMath::addition(cmdStream, AluRegisters::R_0, AluRegisters::R_15, AluRegisters::R_1); + NEO::EncodeMath::addition(cmdStream, AluRegisters::gpr0, AluRegisters::gpr15, AluRegisters::gpr1); // Cmds to store dest address - from GPR auto miStoreRegMemLow = cmdStream.getSpaceForCmd(); diff --git a/shared/source/device_binary_format/elf/elf_decoder.h b/shared/source/device_binary_format/elf/elf_decoder.h index 981130f04f..b0cdc4a046 100644 --- a/shared/source/device_binary_format/elf/elf_decoder.h +++ b/shared/source/device_binary_format/elf/elf_decoder.h @@ -18,8 +18,8 @@ namespace NEO { namespace Elf { enum class RELOCATION_X8664_TYPE : uint32_t { - R_X8664_64 = 0x1, - R_X8664_32 = 0xa + relocation64 = 0x1, + relocation32 = 0xa }; template diff --git a/shared/source/direct_submission/direct_submission_hw.h b/shared/source/direct_submission/direct_submission_hw.h index 51d99875b1..c29dac75ba 100644 --- a/shared/source/direct_submission/direct_submission_hw.h +++ b/shared/source/direct_submission/direct_submission_hw.h @@ -42,9 +42,9 @@ struct TagData { }; enum class DirectSubmissionSfenceMode : int32_t { - Disabled = 0, - BeforeSemaphoreOnly = 1, - BeforeAndAfterSemaphore = 2 + disabled = 0, + beforeSemaphoreOnly = 1, + beforeAndAfterSemaphore = 2 }; namespace UllsDefaults { @@ -225,7 +225,7 @@ class DirectSubmissionHw { uint32_t activeTiles = 1u; uint32_t immWritePostSyncOffset = 0u; uint32_t currentRelaxedOrderingQueueSize = 0; - DirectSubmissionSfenceMode sfenceMode = DirectSubmissionSfenceMode::BeforeAndAfterSemaphore; + DirectSubmissionSfenceMode sfenceMode = DirectSubmissionSfenceMode::beforeAndAfterSemaphore; volatile uint32_t reserved = 0u; uint32_t dispatchErrorCode = 0; QueueThrottle lastSubmittedThrottle = QueueThrottle::MEDIUM; diff --git a/shared/source/direct_submission/direct_submission_hw.inl b/shared/source/direct_submission/direct_submission_hw.inl index 05e61194cf..2bc82dfeac 100644 --- a/shared/source/direct_submission/direct_submission_hw.inl +++ b/shared/source/direct_submission/direct_submission_hw.inl @@ -131,7 +131,7 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeSetMMIO::encodeREG(schedulerCmdStream, RegisterOffsets::csGprR0, RegisterOffsets::csGprR9); EncodeSetMMIO::encodeREG(schedulerCmdStream, RegisterOffsets::csGprR0 + 4, RegisterOffsets::csGprR9 + 4); - EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart(schedulerCmdStream, 0, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, true, false); + EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart(schedulerCmdStream, 0, RegisterOffsets::csGprR1, 0, CompareOperation::equal, true, false); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR2, 0, true); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR2 + 4, 0, true); @@ -159,16 +159,16 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeAluHelper aluHelper; aluHelper.setMocs(miMathMocs); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_2); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_6); - aluHelper.setNextAlu(AluRegisters::OPCODE_SHL); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_7); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8); - aluHelper.setNextAlu(AluRegisters::OPCODE_ADD); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_6, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOADIND, AluRegisters::R_0, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_FENCE_RD); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr2); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr6); + aluHelper.setNextAlu(AluRegisters::opcodeShl); + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr7); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8); + aluHelper.setNextAlu(AluRegisters::opcodeAdd); + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr6, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeLoadind, AluRegisters::gpr0, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeFenceRd); aluHelper.copyToCmdStream(schedulerCmdStream); @@ -181,13 +181,13 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeMiPredicate::encode(schedulerCmdStream, MiPredicateType::disable); - EncodeMathMMIO::encodeDecrement(schedulerCmdStream, AluRegisters::R_1); - EncodeMathMMIO::encodeDecrement(schedulerCmdStream, AluRegisters::R_2); + EncodeMathMMIO::encodeDecrement(schedulerCmdStream, AluRegisters::gpr1); + EncodeMathMMIO::encodeDecrement(schedulerCmdStream, AluRegisters::gpr2); EncodeSetMMIO::encodeREG(schedulerCmdStream, RegisterOffsets::csGprR0, RegisterOffsets::csGprR9); EncodeSetMMIO::encodeREG(schedulerCmdStream, RegisterOffsets::csGprR0 + 4, RegisterOffsets::csGprR9 + 4); - EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart(schedulerCmdStream, 0, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, true, false); + EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart(schedulerCmdStream, 0, RegisterOffsets::csGprR1, 0, CompareOperation::equal, true, false); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR7, 8, true); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR7 + 4, 0, true); @@ -197,20 +197,20 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeAluHelper aluHelper; aluHelper.setMocs(miMathMocs); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_1); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_7); - aluHelper.setNextAlu(AluRegisters::OPCODE_SHL); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_7); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8); - aluHelper.setNextAlu(AluRegisters::OPCODE_ADD); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOADIND, AluRegisters::R_7, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_FENCE_RD); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_6); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD0, AluRegisters::R_SRCB, AluRegisters::OPCODE_NONE); - aluHelper.setNextAlu(AluRegisters::OPCODE_ADD); - aluHelper.setNextAlu(AluRegisters::OPCODE_STOREIND, AluRegisters::R_ACCU, AluRegisters::R_7); - aluHelper.setNextAlu(AluRegisters::OPCODE_FENCE_WR); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr1); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr7); + aluHelper.setNextAlu(AluRegisters::opcodeShl); + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr7); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8); + aluHelper.setNextAlu(AluRegisters::opcodeAdd); + aluHelper.setNextAlu(AluRegisters::opcodeLoadind, AluRegisters::gpr7, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeFenceRd); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr6); + aluHelper.setNextAlu(AluRegisters::opcodeLoad0, AluRegisters::srcb, AluRegisters::opcodeNone); + aluHelper.setNextAlu(AluRegisters::opcodeAdd); + aluHelper.setNextAlu(AluRegisters::opcodeStoreind, AluRegisters::accu, AluRegisters::gpr7); + aluHelper.setNextAlu(AluRegisters::opcodeFenceWr); aluHelper.copyToCmdStream(schedulerCmdStream); } @@ -221,12 +221,12 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeMiPredicate::encode(schedulerCmdStream, MiPredicateType::disable); - EncodeMathMMIO::encodeIncrement(schedulerCmdStream, AluRegisters::R_2); + EncodeMathMMIO::encodeIncrement(schedulerCmdStream, AluRegisters::gpr2); EncodeBatchBufferStartOrEnd::programConditionalRegRegBatchBufferStart( schedulerCmdStream, loopSectionStartAddress, - AluRegisters::R_1, AluRegisters::R_2, CompareOperation::NotEqual, false); + AluRegisters::gpr1, AluRegisters::gpr2, CompareOperation::notEqual, false); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR2, 0, true); LriHelper::program(&schedulerCmdStream, RegisterOffsets::csGprR2 + 4, 0, true); @@ -250,12 +250,12 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart( schedulerCmdStream, loopSectionStartAddress, - RegisterOffsets::csGprR1, currentRelaxedOrderingQueueSize, CompareOperation::GreaterOrEqual, false, false); + RegisterOffsets::csGprR1, currentRelaxedOrderingQueueSize, CompareOperation::greaterOrEqual, false, false); EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart( schedulerCmdStream, loopSectionStartAddress, - RegisterOffsets::csGprR5, 1, CompareOperation::Equal, false, false); + RegisterOffsets::csGprR5, 1, CompareOperation::equal, false, false); } // 6. Scheduler loop check section @@ -267,13 +267,13 @@ void DirectSubmissionHw::dispatchStaticRelaxedOrderingSch EncodeAluHelper aluHelper; aluHelper.setMocs(miMathMocs); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_9); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_10); - aluHelper.setNextAlu(AluRegisters::OPCODE_ADD); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_0, AluRegisters::R_ACCU); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr9); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr10); + aluHelper.setNextAlu(AluRegisters::opcodeAdd); + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr0, AluRegisters::accu); aluHelper.copyToCmdStream(schedulerCmdStream); - EncodeBatchBufferStartOrEnd::programConditionalRegMemBatchBufferStart(schedulerCmdStream, 0, semaphoreGpuVa, RegisterOffsets::csGprR11, CompareOperation::GreaterOrEqual, true); + EncodeBatchBufferStartOrEnd::programConditionalRegMemBatchBufferStart(schedulerCmdStream, 0, semaphoreGpuVa, RegisterOffsets::csGprR11, CompareOperation::greaterOrEqual, true); EncodeBatchBufferStartOrEnd::programBatchBufferStart(&schedulerCmdStream, schedulerStartAddress + RelaxedOrderingHelper::StaticSchedulerSizeAndOffsetSection::loopStartSectionStart, false, false, false); @@ -420,7 +420,7 @@ bool DirectSubmissionHw::makeResourcesResident(DirectSubm template inline void DirectSubmissionHw::unblockGpu() { - if (sfenceMode >= DirectSubmissionSfenceMode::BeforeSemaphoreOnly) { + if (sfenceMode >= DirectSubmissionSfenceMode::beforeSemaphoreOnly) { CpuIntrinsics::sfence(); } @@ -430,7 +430,7 @@ inline void DirectSubmissionHw::unblockGpu() { semaphoreData->queueWorkCount = currentQueueWorkCount; - if (sfenceMode == DirectSubmissionSfenceMode::BeforeAndAfterSemaphore) { + if (sfenceMode == DirectSubmissionSfenceMode::beforeAndAfterSemaphore) { CpuIntrinsics::sfence(); } } @@ -800,7 +800,7 @@ void DirectSubmissionHw::dispatchRelaxedOrderingQueueStal // patch conditional bb_start with current GPU address EncodeBatchBufferStartOrEnd::programConditionalDataRegBatchBufferStart(bbStartStream, ringCommandStream.getCurrentGpuAddressPosition(), - RegisterOffsets::csGprR1, 0, CompareOperation::Equal, false, false); + RegisterOffsets::csGprR1, 0, CompareOperation::equal, false, false); relaxedOrderingSchedulerRequired = false; } @@ -857,19 +857,19 @@ void DirectSubmissionHw::preinitializeRelaxedOrderingSect EncodeAluHelper aluHelper; aluHelper.setMocs(miMathMocs); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_1); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8); - aluHelper.setNextAlu(AluRegisters::OPCODE_SHL); - aluHelper.setNextAlu(AluRegisters::OPCODE_STORE, AluRegisters::R_8, AluRegisters::R_ACCU); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_8); - aluHelper.setNextAlu(AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_6); - aluHelper.setNextAlu(AluRegisters::OPCODE_ADD); - aluHelper.setNextAlu(AluRegisters::OPCODE_STOREIND, AluRegisters::R_ACCU, AluRegisters::R_7); - aluHelper.setNextAlu(AluRegisters::OPCODE_FENCE_WR); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr1); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8); + aluHelper.setNextAlu(AluRegisters::opcodeShl); + aluHelper.setNextAlu(AluRegisters::opcodeStore, AluRegisters::gpr8, AluRegisters::accu); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr8); + aluHelper.setNextAlu(AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr6); + aluHelper.setNextAlu(AluRegisters::opcodeAdd); + aluHelper.setNextAlu(AluRegisters::opcodeStoreind, AluRegisters::accu, AluRegisters::gpr7); + aluHelper.setNextAlu(AluRegisters::opcodeFenceWr); aluHelper.copyToCmdStream(stream); - EncodeMathMMIO::encodeIncrement(stream, AluRegisters::R_1); + EncodeMathMMIO::encodeIncrement(stream, AluRegisters::gpr1); UNRECOVERABLE_IF(stream.getUsed() != RelaxedOrderingHelper::getSizeTaskStoreSection()); diff --git a/shared/source/helpers/blit_helper.cpp b/shared/source/helpers/blit_helper.cpp index 33c4b86c6d..b1804aae0a 100644 --- a/shared/source/helpers/blit_helper.cpp +++ b/shared/source/helpers/blit_helper.cpp @@ -30,7 +30,7 @@ BlitOperationResult BlitHelper::blitMemoryToAllocationBanks(const Device &device const Vec3 &size, DeviceBitfield memoryBanks) { const auto &hwInfo = device.getHardwareInfo(); if (!hwInfo.capabilityTable.blitterOperationsSupported) { - return BlitOperationResult::Unsupported; + return BlitOperationResult::unsupported; } auto &gfxCoreHelper = device.getGfxCoreHelper(); @@ -52,7 +52,7 @@ BlitOperationResult BlitHelper::blitMemoryToAllocationBanks(const Device &device auto bcsEngineUsage = gfxCoreHelper.preferInternalBcsEngine() ? EngineUsage::internal : EngineUsage::regular; auto bcsEngine = pDeviceForBlit->tryGetEngine(bcsEngineType, bcsEngineUsage); if (!bcsEngine) { - return BlitOperationResult::Unsupported; + return BlitOperationResult::unsupported; } bcsEngine->commandStreamReceiver->initializeResources(); @@ -67,11 +67,11 @@ BlitOperationResult BlitHelper::blitMemoryToAllocationBanks(const Device &device const auto newTaskCount = bcsEngine->commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, false, *pDeviceForBlit); if (newTaskCount == CompletionStamp::gpuHang) { - return BlitOperationResult::GpuHang; + return BlitOperationResult::gpuHang; } } - return BlitOperationResult::Success; + return BlitOperationResult::success; } } // namespace NEO diff --git a/shared/source/helpers/blit_helper.h b/shared/source/helpers/blit_helper.h index 13fc3731df..acc30a21bd 100644 --- a/shared/source/helpers/blit_helper.h +++ b/shared/source/helpers/blit_helper.h @@ -17,10 +17,10 @@ class Device; class GraphicsAllocation; enum class BlitOperationResult { - Unsupported, - Fail, - Success, - GpuHang + unsupported, + fail, + success, + gpuHang }; namespace BlitHelperFunctions { @@ -39,4 +39,4 @@ struct BlitHelper { const Vec3 &size, DeviceBitfield memoryBanks); }; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/helpers/register_offsets.h b/shared/source/helpers/register_offsets.h index 17cf03a8a8..bfe8bbc4ee 100644 --- a/shared/source/helpers/register_offsets.h +++ b/shared/source/helpers/register_offsets.h @@ -55,42 +55,42 @@ inline constexpr uint32_t globalTimestampUn = 0x235c; // Alu opcodes enum class AluRegisters : uint32_t { - OPCODE_NONE = 0x000, - OPCODE_FENCE_RD = 0x001, - OPCODE_FENCE_WR = 0x002, + opcodeNone = 0x000, + opcodeFenceRd = 0x001, + opcodeFenceWr = 0x002, - OPCODE_LOAD = 0x080, - OPCODE_LOAD0 = 0x081, - OPCODE_LOADIND = 0x082, - OPCODE_STORE = 0x180, - OPCODE_ADD = 0x100, - OPCODE_SUB = 0x101, - OPCODE_AND = 0x102, - OPCODE_OR = 0x103, + opcodeLoad = 0x080, + opcodeLoad0 = 0x081, + opcodeLoadind = 0x082, + opcodeStore = 0x180, + opcodeAdd = 0x100, + opcodeSub = 0x101, + opcodeAnd = 0x102, + opcodeOr = 0x103, - OPCODE_SHL = 0x105, - OPCODE_STOREIND = 0x181, + opcodeShl = 0x105, + opcodeStoreind = 0x181, - R_0 = 0x0, - R_1 = 0x1, - R_2 = 0x2, - R_3 = 0x3, - R_4 = 0x4, - R_5 = 0x5, - R_6 = 0x6, - R_7 = 0x7, - R_8 = 0x8, - R_9 = 0x9, - R_10 = 0xA, - R_11 = 0xB, - R_12 = 0xC, - R_13 = 0xD, - R_14 = 0xE, - R_15 = 0xF, + gpr0 = 0x0, + gpr1 = 0x1, + gpr2 = 0x2, + gpr3 = 0x3, + gpr4 = 0x4, + gpr5 = 0x5, + gpr6 = 0x6, + gpr7 = 0x7, + gpr8 = 0x8, + gpr9 = 0x9, + gpr10 = 0xA, + gpr11 = 0xB, + gpr12 = 0xC, + gpr13 = 0xD, + gpr14 = 0xE, + gpr15 = 0xF, - R_SRCA = 0x20, - R_SRCB = 0x21, - R_ACCU = 0x31, - R_ZF = 0x32, - R_CF = 0x33 + srca = 0x20, + srcb = 0x21, + accu = 0x31, + zf = 0x32, + cf = 0x33 }; diff --git a/shared/source/helpers/timestamp_packet.h b/shared/source/helpers/timestamp_packet.h index 28f921bba0..b2e36c53c4 100644 --- a/shared/source/helpers/timestamp_packet.h +++ b/shared/source/helpers/timestamp_packet.h @@ -116,7 +116,7 @@ struct TimestampPacketHelper { uint64_t compareOffset = packetId * timestampPacketNode.getSinglePacketSize(); EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(cmdStream, 0, compareAddress + compareOffset, TimestampPacketConstants::initValue, - NEO::CompareOperation::Equal, true, false); + NEO::CompareOperation::equal, true, false); } } diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index 85347ff2a8..97a30728d0 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -1034,7 +1034,7 @@ bool MemoryManager::allocateBindlessSlot(GraphicsAllocation *allocation) { bool MemoryTransferHelper::transferMemoryToAllocation(bool useBlitter, const Device &device, GraphicsAllocation *dstAllocation, size_t dstOffset, const void *srcMemory, size_t srcSize) { if (useBlitter) { - if (BlitHelperFunctions::blitMemoryToAllocation(device, dstAllocation, dstOffset, srcMemory, {srcSize, 1, 1}) == BlitOperationResult::Success) { + if (BlitHelperFunctions::blitMemoryToAllocation(device, dstAllocation, dstOffset, srcMemory, {srcSize, 1, 1}) == BlitOperationResult::success) { return true; } } @@ -1042,7 +1042,7 @@ bool MemoryTransferHelper::transferMemoryToAllocation(bool useBlitter, const Dev } bool MemoryTransferHelper::transferMemoryToAllocationBanks(const Device &device, GraphicsAllocation *dstAllocation, size_t dstOffset, const void *srcMemory, size_t srcSize, DeviceBitfield dstMemoryBanks) { - auto blitSuccess = BlitHelper::blitMemoryToAllocationBanks(device, dstAllocation, dstOffset, srcMemory, {srcSize, 1, 1}, dstMemoryBanks) == BlitOperationResult::Success; + auto blitSuccess = BlitHelper::blitMemoryToAllocationBanks(device, dstAllocation, dstOffset, srcMemory, {srcSize, 1, 1}, dstMemoryBanks) == BlitOperationResult::success; if (!blitSuccess) { return device.getMemoryManager()->copyMemoryToAllocationBanks(dstAllocation, dstOffset, srcMemory, srcSize, dstMemoryBanks); diff --git a/shared/test/common/helpers/relaxed_ordering_commands_helper.h b/shared/test/common/helpers/relaxed_ordering_commands_helper.h index dd25921bc8..a1396f7315 100644 --- a/shared/test/common/helpers/relaxed_ordering_commands_helper.h +++ b/shared/test/common/helpers/relaxed_ordering_commands_helper.h @@ -95,27 +95,27 @@ bool verifyIncrementOrDecrement(void *cmds, AluRegisters aluRegister, bool incre } auto miAluCmd = reinterpret_cast(++miMathCmd); - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, aluRegister)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, aluRegister)) { return false; } miAluCmd++; - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_7)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr7)) { return false; } miAluCmd++; - if (increment && !verifyAlu(miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (increment && !verifyAlu(miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!increment && !verifyAlu(miAluCmd, AluRegisters::OPCODE_SUB, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!increment && !verifyAlu(miAluCmd, AluRegisters::opcodeSub, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } miAluCmd++; - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_STORE, aluRegister, AluRegisters::R_ACCU)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeStore, aluRegister, AluRegisters::accu)) { return false; } @@ -163,28 +163,28 @@ bool verifyBaseConditionalBbStart(void *cmd, CompareOperation compareOperation, } auto miAluCmd = reinterpret_cast(++miMathCmd); - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, regA)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, regA)) { return false; } miAluCmd++; - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, regB)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, regB)) { return false; } miAluCmd++; - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_SUB, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeSub, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } miAluCmd++; - if (compareOperation == CompareOperation::Equal || compareOperation == CompareOperation::NotEqual) { - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ZF)) { + if (compareOperation == CompareOperation::equal || compareOperation == CompareOperation::notEqual) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::zf)) { return false; } } else { - if (!verifyAlu(miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_CF)) { + if (!verifyAlu(miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::cf)) { return false; } } @@ -195,7 +195,7 @@ bool verifyBaseConditionalBbStart(void *cmd, CompareOperation compareOperation, } auto predicateCmd = reinterpret_cast(++lrrCmd); - if ((compareOperation == CompareOperation::Equal) || (compareOperation == CompareOperation::Less)) { + if ((compareOperation == CompareOperation::equal) || (compareOperation == CompareOperation::less)) { if (!verifyMiPredicate(predicateCmd, MiPredicateType::noopOnResult2Clear)) { return false; } @@ -259,7 +259,7 @@ bool verifyConditionalDataMemBbStart(void *cmd, uint64_t startAddress, uint64_t return false; } - return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } template @@ -288,7 +288,7 @@ bool verifyConditionalDataRegBbStart(void *cmds, uint64_t startAddress, uint32_t return false; } - return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } template @@ -318,7 +318,7 @@ bool verifyConditionalRegMemBbStart(void *cmds, uint64_t startAddress, uint64_t return false; } - return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + return verifyBaseConditionalBbStart(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } } // namespace RelaxedOrderingCommandsHelper diff --git a/shared/test/common/mocks/mock_compiler_interface.h b/shared/test/common/mocks/mock_compiler_interface.h index 7047811f02..7d5c34d3d3 100644 --- a/shared/test/common/mocks/mock_compiler_interface.h +++ b/shared/test/common/mocks/mock_compiler_interface.h @@ -132,7 +132,7 @@ class MockCompilerInterface : public CompilerInterface { if (this->sipKernelBinaryOverride.size() > 0) { retBinary = this->sipKernelBinaryOverride; this->requestedSipKernel = type; - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } else { return CompilerInterface::getSipKernelBinary(device, type, retBinary, stateAreaHeader); } @@ -200,7 +200,7 @@ struct MockCompilerInterfaceCaptureBuildOptions : CompilerInterface { copy(out.deviceBinary, output.intermediateRepresentation); out.intermediateCodeType = output.intermediateCodeType; - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode build(const NEO::Device &device, const TranslationInput &input, TranslationOutput &out) override { diff --git a/shared/test/common/mocks/mock_compiler_interface_spirv.cpp b/shared/test/common/mocks/mock_compiler_interface_spirv.cpp index fe28a638b7..a668a943e9 100644 --- a/shared/test/common/mocks/mock_compiler_interface_spirv.cpp +++ b/shared/test/common/mocks/mock_compiler_interface_spirv.cpp @@ -25,7 +25,7 @@ TranslationOutput::ErrorCode MockCompilerInterfaceSpirv::compile(const NEO::Devi output.deviceBinary.size = size; output.intermediateCodeType = IGC::CodeType::spirV; - return TranslationOutput::ErrorCode::Success; + return TranslationOutput::ErrorCode::success; } TranslationOutput::ErrorCode MockCompilerInterfaceSpirv::build(const NEO::Device &device, const TranslationInput &input, TranslationOutput &out) { return this->compile(device, input, out); diff --git a/shared/test/common/mocks/mock_elf.h b/shared/test/common/mocks/mock_elf.h index b31fe3e4f4..3e0c6153d5 100644 --- a/shared/test/common/mocks/mock_elf.h +++ b/shared/test/common/mocks/mock_elf.h @@ -91,7 +91,7 @@ struct MockElfEncoder : public NEO::Elf::ElfEncoder { NEO::Elf::ElfRela relocationsWithAddend; relocationsWithAddend.addend = 0x1a8; - relocationsWithAddend.info = static_cast(textSectionIndex) << 32 | uint32_t(NEO::Elf::RELOCATION_X8664_TYPE::R_X8664_64); + relocationsWithAddend.info = static_cast(textSectionIndex) << 32 | uint32_t(NEO::Elf::RELOCATION_X8664_TYPE::relocation64); relocationsWithAddend.offset = 8; elfEncoder.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Elf::SpecialSectionNames::debugInfo, ArrayRef(dummyData, sizeof(dummyData))); @@ -108,7 +108,7 @@ struct MockElfEncoder : public NEO::Elf::ElfEncoder { relaDebugSection->info = debugSectionIndex; relocationsWithAddend.addend = 0; - relocationsWithAddend.info = static_cast(textSectionIndex) << 32 | uint32_t(NEO::Elf::RELOCATION_X8664_TYPE::R_X8664_64); + relocationsWithAddend.info = static_cast(textSectionIndex) << 32 | uint32_t(NEO::Elf::RELOCATION_X8664_TYPE::relocation64); relocationsWithAddend.offset = 0; elfEncoder.appendSection(NEO::Elf::SHT_RELA, NEO::Elf::SpecialSectionNames::relaPrefix.str() + NEO::Elf::SpecialSectionNames::debug.str() + "_line", diff --git a/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp b/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp index 7336102f21..cd23f2416c 100644 --- a/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp +++ b/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp @@ -358,7 +358,7 @@ TEST(CompilerInterfaceCachedTests, GivenNoCachedBinaryWhenBuildingThenErrorIsRet inputArgs.allowCaching = true; MockDevice device; auto err = compilerInterface->build(device, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::BuildFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::buildFailure, err); gEnvironment->fclPopDebugVars(); gEnvironment->igcPopDebugVars(); @@ -387,7 +387,7 @@ TEST(CompilerInterfaceCachedTests, GivenCachedBinaryWhenBuildingThenSuccessIsRet TranslationOutput translationOutput; MockDevice device; auto err = compilerInterface->build(device, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); gEnvironment->fclPopDebugVars(); gEnvironment->igcPopDebugVars(); @@ -418,7 +418,7 @@ TEST(CompilerInterfaceCachedTests, givenKernelWithoutIncludesAndBinaryInCacheWhe TranslationOutput translationOutput; inputArgs.allowCaching = true; auto retVal = compilerInterface->build(device, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, retVal); + EXPECT_EQ(TranslationOutput::ErrorCode::success, retVal); gEnvironment->fclPopDebugVars(); gEnvironment->igcPopDebugVars(); @@ -442,7 +442,7 @@ TEST(CompilerInterfaceCachedTests, givenKernelWithIncludesAndBinaryInCacheWhenCo TranslationOutput translationOutput; inputArgs.allowCaching = true; auto retVal = compilerInterface->build(device, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::BuildFailure, retVal); + EXPECT_EQ(TranslationOutput::ErrorCode::buildFailure, retVal); gEnvironment->fclPopDebugVars(); } diff --git a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp index 248e709654..202a24ff4e 100644 --- a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp +++ b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp @@ -153,7 +153,7 @@ TEST(CompilerInterfaceCreateInstance, WhenInitializeFailedThenReturnNull) { TEST_F(CompilerInterfaceTest, WhenCompilingToIsaThenSuccessIsReturned) { TranslationOutput translationOutput; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); } TEST_F(CompilerInterfaceTest, WhenPreferredIntermediateRepresentationSpecifiedThenPreserveIt) { @@ -165,14 +165,14 @@ TEST_F(CompilerInterfaceTest, WhenPreferredIntermediateRepresentationSpecifiedTh inputArgs.preferredIntermediateType = IGC::CodeType::llvmLl; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); EXPECT_EQ(IGC::CodeType::llvmLl, translationOutput.intermediateCodeType); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); } TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenBuildFailsGracefully) { pCompilerInterface->igcMain.reset(nullptr); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); } TEST_F(CompilerInterfaceTest, whenFclTranslatorReturnsNullptrThenBuildFailsGracefully) { @@ -184,7 +184,7 @@ TEST_F(CompilerInterfaceTest, whenFclTranslatorReturnsNullptrThenBuildFailsGrace TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); pCompilerInterface->failCreateFclTranslationCtx = false; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); } TEST_F(CompilerInterfaceTest, whenIgcTranslatorReturnsNullptrThenBuildFailsGracefully) { @@ -196,7 +196,7 @@ TEST_F(CompilerInterfaceTest, whenIgcTranslatorReturnsNullptrThenBuildFailsGrace TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); pCompilerInterface->failCreateIgcTranslationCtx = true; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); } TEST_F(CompilerInterfaceTest, GivenOptionsWhenCompilingToIsaThenSuccessIsReturned) { @@ -216,7 +216,7 @@ TEST_F(CompilerInterfaceTest, GivenOptionsWhenCompilingToIsaThenSuccessIsReturne TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); gEnvironment->fclPopDebugVars(); gEnvironment->igcPopDebugVars(); @@ -228,7 +228,7 @@ TEST_F(CompilerInterfaceTest, WhenCompilingToIrThenSuccessIsReturned) { gEnvironment->fclPushDebugVars(fclDebugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); gEnvironment->fclPopDebugVars(); } @@ -237,19 +237,19 @@ TEST_F(CompilerInterfaceTest, GivenProgramCreatedFromIrWhenCompileIsCalledThenDo TranslationOutput translationOutput = {}; inputArgs.srcType = IGC::CodeType::spirV; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::AlreadyCompiled, err); + EXPECT_EQ(TranslationOutput::ErrorCode::alreadyCompiled, err); inputArgs.srcType = IGC::CodeType::llvmBc; err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::AlreadyCompiled, err); + EXPECT_EQ(TranslationOutput::ErrorCode::alreadyCompiled, err); inputArgs.srcType = IGC::CodeType::llvmLl; err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::AlreadyCompiled, err); + EXPECT_EQ(TranslationOutput::ErrorCode::alreadyCompiled, err); inputArgs.srcType = IGC::CodeType::oclGenBin; err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::AlreadyCompiled, err); + EXPECT_EQ(TranslationOutput::ErrorCode::alreadyCompiled, err); } TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenCompileFailsGracefully) { @@ -260,7 +260,7 @@ TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenCompileFailsGraceful pCompilerInterface->setIgcMain(nullptr); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); gEnvironment->fclPopDebugVars(); } @@ -273,7 +273,7 @@ TEST_F(CompilerInterfaceTest, whenFclTranslatorReturnsNullptrThenCompileFailsGra TranslationOutput translationOutput = {}; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); pCompilerInterface->failCreateFclTranslationCtx = false; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); gEnvironment->fclPopDebugVars(); } @@ -285,7 +285,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenCompilingToIrThenCompila gEnvironment->fclPushDebugVars(fclDebugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilationFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilationFailure, err); gEnvironment->fclPopDebugVars(); } @@ -297,7 +297,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenLinkingIrThenLinkFailure gEnvironment->igcPushDebugVars(igcDebugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::LinkFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::linkFailure, err); gEnvironment->igcPopDebugVars(); } @@ -310,7 +310,7 @@ TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenOclGenBinIsTheTranslationTarge TranslationOutput translationOutput = {}; auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput); gEnvironment->igcPopDebugVars(); - ASSERT_EQ(TranslationOutput::ErrorCode::Success, err); + ASSERT_EQ(TranslationOutput::ErrorCode::success, err); ASSERT_EQ(1u, pCompilerInterface->requestedTranslationCtxs.size()); MockCompilerInterface::TranslationOpT translation = {IGC::CodeType::elf, IGC::CodeType::oclGenBin}; @@ -325,7 +325,7 @@ TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenLinkFailsGracefully) pCompilerInterface->setIgcMain(nullptr); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); gEnvironment->igcPopDebugVars(); } @@ -338,7 +338,7 @@ TEST_F(CompilerInterfaceTest, whenSrcAllocationFailsThenLinkFailsGracefully) { TranslationOutput translationOutput = {}; auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput); MockCIFBuffer::failAllocations = false; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); gEnvironment->igcPopDebugVars(); } @@ -351,7 +351,7 @@ TEST_F(CompilerInterfaceTest, whenTranslateReturnsNullptrThenLinkFailsGracefully TranslationOutput translationOutput = {}; auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput); pCompilerInterface->failCreateIgcTranslationCtx = false; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); gEnvironment->igcPopDebugVars(); } @@ -364,7 +364,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenCreatingLibraryThenLinkF gEnvironment->igcPushDebugVars(igcDebugVars); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::LinkFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::linkFailure, err); gEnvironment->igcPopDebugVars(); } @@ -377,7 +377,7 @@ TEST_F(CompilerInterfaceTest, WhenCreateLibraryIsCalledThenLlvmBcIsUsedAsInterme TranslationOutput translationOutput = {}; auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput); gEnvironment->igcPopDebugVars(); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); ASSERT_EQ(1U, pCompilerInterface->requestedTranslationCtxs.size()); EXPECT_EQ(IGC::CodeType::llvmBc, pCompilerInterface->requestedTranslationCtxs[0].second); @@ -391,7 +391,7 @@ TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenCreateLibraryFailsGr pCompilerInterface->setIgcMain(nullptr); TranslationOutput translationOutput = {}; auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); gEnvironment->igcPopDebugVars(); } @@ -404,7 +404,7 @@ TEST_F(CompilerInterfaceTest, whenIgcTranslatorReturnsNullptrThenCreateLibraryFa TranslationOutput translationOutput = {}; auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput); pCompilerInterface->failCreateIgcTranslationCtx = false; - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); gEnvironment->igcPopDebugVars(); } @@ -424,7 +424,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenFclBuildingThenBuildFail TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::BuildFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::buildFailure, err); gEnvironment->fclPopDebugVars(); } @@ -444,7 +444,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenIgcBuildingThenBuildFail TranslationOutput translationOutput = {}; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::BuildFailure, err); + EXPECT_EQ(TranslationOutput::ErrorCode::buildFailure, err); gEnvironment->igcPopDebugVars(); } @@ -760,7 +760,7 @@ TEST_F(CompilerInterfaceTest, givenUpdatedSpecConstValuesWhenBuildProgramThenPro TranslationOutput translationOutput; auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); } TEST_F(CompilerInterfaceTest, GivenRequestForNewFclTranslationCtxWhenDeviceCtxIsNotAvailableThenCreateNewDeviceCtxAndUseItToReturnValidTranslationCtx) { @@ -1010,7 +1010,7 @@ TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenGetSipKernelBinaryFa std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); EXPECT_EQ(0U, sipBinary.size()); } @@ -1022,7 +1022,7 @@ TEST_F(CompilerInterfaceTest, whenIgcReturnsErrorThenGetSipKernelBinaryFailsGrac std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); EXPECT_EQ(0U, sipBinary.size()); gEnvironment->igcPopDebugVars(); @@ -1034,7 +1034,7 @@ TEST_F(CompilerInterfaceTest, whenGetIgcDeviceCtxReturnsNullptrThenGetSipKernelB std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); } TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutputAsSipBinary) { @@ -1044,7 +1044,7 @@ TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutpu std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); gEnvironment->igcPopDebugVars(); @@ -1056,17 +1056,17 @@ TEST_F(CompilerInterfaceTest, whenRequestingSipKernelBinaryThenProperSystemRouti std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::contextSaveRestore, getIgcDebugVars().typeOfSystemRoutine); err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::dbgCsr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::debug, getIgcDebugVars().typeOfSystemRoutine); err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::dbgCsrLocal, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::debugSlm, getIgcDebugVars().typeOfSystemRoutine); @@ -1079,19 +1079,19 @@ TEST_F(CompilerInterfaceTest, WhenRequestingBindlessDebugSipThenProperSystemRout std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::csr, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::contextSaveRestore, getIgcDebugVars().typeOfSystemRoutine); EXPECT_EQ(MockCompilerDebugVars::SipAddressingType::bindful, getIgcDebugVars().receivedSipAddressingType); err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::dbgCsrLocal, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::debugSlm, getIgcDebugVars().typeOfSystemRoutine); EXPECT_EQ(MockCompilerDebugVars::SipAddressingType::bindful, getIgcDebugVars().receivedSipAddressingType); err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::dbgBindless, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); EXPECT_NE(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::debug, getIgcDebugVars().typeOfSystemRoutine); EXPECT_EQ(MockCompilerDebugVars::SipAddressingType::bindless, getIgcDebugVars().receivedSipAddressingType); @@ -1105,7 +1105,7 @@ TEST_F(CompilerInterfaceTest, whenRequestingInvalidSipKernelBinaryThenErrorIsRet std::vector sipBinary; std::vector stateAreaHeader; auto err = pCompilerInterface->getSipKernelBinary(*this->pDevice, SipKernelType::count, sipBinary, stateAreaHeader); - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); EXPECT_EQ(0U, sipBinary.size()); EXPECT_EQ(IGC::SystemRoutineType::undefined, getIgcDebugVars().typeOfSystemRoutine); @@ -1116,7 +1116,7 @@ TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenGetSpecializationCon pCompilerInterface->igcMain.reset(); NEO::SpecConstantInfo sci; auto err = pCompilerInterface->getSpecConstantsInfo(*pDevice, ArrayRef{}, sci); - EXPECT_EQ(TranslationOutput::ErrorCode::CompilerNotAvailable, err); + EXPECT_EQ(TranslationOutput::ErrorCode::compilerNotAvailable, err); } TEST_F(CompilerInterfaceTest, givenCompilerInterfacewhenGettingIgcFeaturesAndWorkaroundsThenValidPointerIsReturned) { @@ -1233,14 +1233,14 @@ TEST_F(CompilerInterfaceTest, whenIgcTranlationContextCreationFailsThenErrorIsRe pCompilerInterface->failCreateIgcTranslationCtx = true; NEO::SpecConstantInfo specConstInfo; auto err = pCompilerInterface->getSpecConstantsInfo(*pDevice, inputArgs.src, specConstInfo); - EXPECT_EQ(TranslationOutput::ErrorCode::UnknownError, err); + EXPECT_EQ(TranslationOutput::ErrorCode::unknownError, err); } TEST_F(CompilerInterfaceTest, givenCompilerInterfaceWhenGetSpecializationConstantsThenSuccesIsReturned) { TranslationOutput translationOutput; NEO::SpecConstantInfo specConstInfo; auto err = pCompilerInterface->getSpecConstantsInfo(*pDevice, inputArgs.src, specConstInfo); - EXPECT_EQ(TranslationOutput::ErrorCode::Success, err); + EXPECT_EQ(TranslationOutput::ErrorCode::success, err); } struct UnknownInterfaceCIFMain : MockCIFMain { diff --git a/shared/test/unit_test/compiler_interface/linker_tests.cpp b/shared/test/unit_test/compiler_interface/linker_tests.cpp index a87b5a9d4b..f0423635d2 100644 --- a/shared/test/unit_test/compiler_interface/linker_tests.cpp +++ b/shared/test/unit_test/compiler_interface/linker_tests.cpp @@ -750,7 +750,7 @@ HWTEST_F(LinkerTests, givenEmptyLinkerInputThenLinkerOutputIsEmpty) { globalVar, globalConst, exportedFunc, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); EXPECT_EQ(0U, unresolvedExternals.size()); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -772,7 +772,7 @@ HWTEST_F(LinkerTests, givenInvalidLinkerInputThenLinkerFails) { globalVar, globalConst, exportedFunc, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, extFuncs); - EXPECT_EQ(NEO::LinkingStatus::Error, linkResult); + EXPECT_EQ(NEO::LinkingStatus::error, linkResult); } HWTEST_F(LinkerTests, givenUnresolvedExternalSymbolsWhenResolveBuiltinsIsCalledThenSubDeviceIDSymbolsAreRemoved) { @@ -886,7 +886,7 @@ HWTEST_F(LinkerTests, givenUnresolvedExternalWhenPatchingInstructionsThenLinkPar globalVar, globalConst, exportedFunc, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedPartially, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedPartially, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, relocatedSymbols.size()); ASSERT_EQ(1U, unresolvedExternals.size()); @@ -997,7 +997,7 @@ HWTEST_F(LinkerTests, givenValidSymbolsAndRelocationsThenInstructionSegmentsAreP globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(3U, relocatedSymbols.size()); @@ -1061,7 +1061,7 @@ HWTEST_F(LinkerTests, givenInvalidSymbolOffsetWhenPatchingInstructionsThenReloca globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::Error, linkResult); + EXPECT_EQ(NEO::LinkingStatus::error, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -1071,7 +1071,7 @@ HWTEST_F(LinkerTests, givenInvalidSymbolOffsetWhenPatchingInstructionsThenReloca globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); } HWTEST_F(LinkerTests, givenInvalidRelocationOffsetThenPatchingOfInstructionsFails) { @@ -1113,7 +1113,7 @@ HWTEST_F(LinkerTests, givenInvalidRelocationOffsetThenPatchingOfInstructionsFail globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedPartially, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedPartially, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(1U, relocatedSymbols.size()); ASSERT_EQ(1U, unresolvedExternals.size()); @@ -1124,7 +1124,7 @@ HWTEST_F(LinkerTests, givenInvalidRelocationOffsetThenPatchingOfInstructionsFail globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); } HWTEST_F(LinkerTests, givenUnknownSymbolTypeWhenPatchingInstructionsThenRelocationFails) { @@ -1168,7 +1168,7 @@ HWTEST_F(LinkerTests, givenUnknownSymbolTypeWhenPatchingInstructionsThenRelocati globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::Error, linkResult); + EXPECT_EQ(NEO::LinkingStatus::error, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, relocatedSymbols.size()); ASSERT_EQ(0U, unresolvedExternals.size()); @@ -1177,7 +1177,7 @@ HWTEST_F(LinkerTests, givenUnknownSymbolTypeWhenPatchingInstructionsThenRelocati linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); } HWTEST_F(LinkerTests, givenValidStringSymbolsAndRelocationsWhenPatchingThenItIsProperlyPatched) { @@ -1216,7 +1216,7 @@ HWTEST_F(LinkerTests, givenValidStringSymbolsAndRelocationsWhenPatchingThenItIsP {}, {}, {}, stringSegment, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_TRUE(linker.extractRelocatedSymbols().empty()); @@ -1371,7 +1371,7 @@ HWTEST_F(LinkerTests, givenValidSymbolsAndRelocationsWhenPatchingDataSegmentsThe &globalVariablesPatchableSegment, &globalConstantsPatchableSegment, {}, unresolvedExternals, pDevice, initGlobalConstantData, sizeof(initGlobalConstantData), initGlobalVariablesData, sizeof(initGlobalVariablesData), kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); EXPECT_EQ(0U, unresolvedExternals.size()); auto constantsAddr = globalConstantsSegmentInfo.gpuAddress; @@ -1522,7 +1522,7 @@ HWTEST_F(LinkerTests, givenValidSymbolsAndRelocationsToBssDataSectionsWhenPatchi &globalVariablesPatchableSegment, &globalConstantsPatchableSegment, patchableInstructionSegments, unresolvedExternals, pDevice, initGlobalConstantData, sizeof(initGlobalConstantData), initGlobalVariablesData, sizeof(initGlobalVariablesData), kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); EXPECT_EQ(0U, unresolvedExternals.size()); auto globalConstantsSegmentAddr = reinterpret_cast(globalConstantsPatchableSegment.getUnderlyingBuffer()); @@ -1569,7 +1569,7 @@ HWTEST_F(LinkerTests, givenInvalidSymbolWhenPatchingDataSegmentsThenRelocationIs &globalVariablesPatchableSegment, &globalConstantsPatchableSegment, {}, unresolvedExternals, pDevice, initGlobalConstantData, sizeof(initGlobalConstantData), initGlobalVariablesData, sizeof(initGlobalVariablesData), kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedPartially, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedPartially, linkResult); EXPECT_EQ(1U, unresolvedExternals.size()); } @@ -1608,7 +1608,7 @@ HWTEST_F(LinkerTests, givenInvalidRelocationOffsetWhenPatchingDataSegmentsThenRe &globalVariablesPatchableSegment, &globalConstantsPatchableSegment, {}, unresolvedExternals, pDevice, initGlobalConstantData, sizeof(initGlobalConstantData), initGlobalVariablesData, sizeof(initGlobalVariablesData), kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedPartially, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedPartially, linkResult); EXPECT_EQ(1U, unresolvedExternals.size()); } @@ -1634,7 +1634,7 @@ HWTEST_F(LinkerTests, givenInvalidRelocationSegmentWhenPatchingDataSegmentsThenR auto linkResult = linker.link(globalSegment, {}, {}, {}, nullptr, nullptr, {}, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedPartially, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedPartially, linkResult); EXPECT_EQ(1U, unresolvedExternals.size()); } @@ -1674,7 +1674,7 @@ HWTEST_F(LinkerTests, given32BitBinaryWithValidSymbolsAndRelocationsWhenPatching &globalVariablesPatchableSegment, &globalConstantsPatchableSegment, {}, unresolvedExternals, pDevice, initGlobalConstantData, sizeof(initGlobalConstantData), initGlobalVariablesData, sizeof(initGlobalVariablesData), kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(globalVariablesSegmentInfo.gpuAddress & 0xffffffff, *(uint32_t *)(globalConstantsSegmentInfo.gpuAddress)); @@ -1826,7 +1826,7 @@ TEST_F(LinkerTests, GivenDebugDataWhenApplyingDebugDataRelocationsThenRelocation NEO::Elf::Elf::RelocationInfo reloc0 = {}; reloc0.offset = 64; - reloc0.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::R_X8664_64); + reloc0.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::relocation64); reloc0.symbolName = ".debug_abbrev"; reloc0.symbolSectionIndex = 3; reloc0.symbolTableIndex = 0; @@ -1837,7 +1837,7 @@ TEST_F(LinkerTests, GivenDebugDataWhenApplyingDebugDataRelocationsThenRelocation NEO::Elf::Elf::RelocationInfo reloc1 = {}; reloc1.offset = 32; - reloc1.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::R_X8664_32); + reloc1.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::relocation32); reloc1.symbolName = ".debug_line"; reloc1.symbolSectionIndex = 4; reloc1.symbolTableIndex = 0; @@ -1848,7 +1848,7 @@ TEST_F(LinkerTests, GivenDebugDataWhenApplyingDebugDataRelocationsThenRelocation NEO::Elf::Elf::RelocationInfo reloc2 = {}; reloc2.offset = 32; - reloc2.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::R_X8664_64); + reloc2.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::relocation64); reloc2.symbolName = ".text"; reloc2.symbolSectionIndex = 0; reloc2.symbolTableIndex = 0; @@ -1859,7 +1859,7 @@ TEST_F(LinkerTests, GivenDebugDataWhenApplyingDebugDataRelocationsThenRelocation NEO::Elf::Elf::RelocationInfo reloc3 = {}; reloc3.offset = 0; - reloc3.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::R_X8664_64); + reloc3.relocType = static_cast(Elf::RELOCATION_X8664_TYPE::relocation64); reloc3.symbolName = ".data"; reloc3.symbolSectionIndex = 1; reloc3.symbolTableIndex = 0; @@ -1971,7 +1971,7 @@ TEST_F(LinkerTests, givenImplicitArgRelocationAndStackCallsThenPatchRelocationWi auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, deviceFactory.rootDevices[0], nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2033,7 +2033,7 @@ TEST_F(LinkerDebuggingSupportedTests, givenImplicitArgRelocationAndEnabledDebugg auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, device, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2082,7 +2082,7 @@ TEST_F(LinkerDebuggingSupportedTests, givenNoImplicitArgRelocationAndEnabledDebu auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, device, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2138,7 +2138,7 @@ TEST_F(LinkerTests, givenImplicitArgRelocationWithoutStackCallsAndDisabledDebugg auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, device, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2182,7 +2182,7 @@ TEST_F(LinkerTests, givenNoImplicitArgRelocationAndStackCallsThenImplicitArgsAre auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, deviceFactory.rootDevices[0], nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2239,7 +2239,7 @@ TEST_F(LinkerTests, givenMultipleImplicitArgsRelocationsWithinSingleKernelWhenLi auto linkResult = linker.link(globalVarSegment, globalConstSegment, exportedFuncSegment, {}, nullptr, nullptr, patchableInstructionSegments, unresolvedExternals, deviceFactory.rootDevices[0], nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(NEO::LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(NEO::LinkingStatus::linkedFully, linkResult); auto relocatedSymbols = linker.extractRelocatedSymbols(); EXPECT_EQ(0U, unresolvedExternals.size()); EXPECT_EQ(0U, relocatedSymbols.size()); @@ -2266,7 +2266,7 @@ HWTEST_F(LinkerTests, givenDependencyOnMissingExternalFunctionWhenLinkingThenFai globalVar, globalConst, exportedFunc, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(LinkingStatus::Error, linkResult); + EXPECT_EQ(LinkingStatus::error, linkResult); } HWTEST_F(LinkerTests, givenDependencyOnMissingExternalFunctionAndNoExternalFunctionInfosWhenLinkingThenDoNotResolveDependenciesAndReturnSuccess) { @@ -2284,7 +2284,7 @@ HWTEST_F(LinkerTests, givenDependencyOnMissingExternalFunctionAndNoExternalFunct globalVar, globalConst, exportedFunc, {}, patchableGlobalVarSeg, patchableConstVarSeg, patchableInstructionSegments, unresolvedExternals, pDevice, nullptr, 0, nullptr, 0, kernelDescriptors, externalFunctions); - EXPECT_EQ(LinkingStatus::LinkedFully, linkResult); + EXPECT_EQ(LinkingStatus::linkedFully, linkResult); } TEST_F(LinkerTests, givenRelaWhenPatchingInstructionsSegmentThenAddendIsAdded) { diff --git a/shared/test/unit_test/debugger/test_l0_debugger.cpp b/shared/test/unit_test/debugger/test_l0_debugger.cpp index 30f51c6062..25c12c2e3e 100644 --- a/shared/test/unit_test/debugger/test_l0_debugger.cpp +++ b/shared/test/unit_test/debugger/test_l0_debugger.cpp @@ -182,7 +182,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenCreatedThenModuleHeapDebugAreaIsCreate auto mockBlitMemoryToAllocation = [](const NEO::Device &device, NEO::GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> NEO::BlitOperationResult { memcpy(memory->getUnderlyingBuffer(), hostPtr, size.x); - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup( &NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation); @@ -223,7 +223,7 @@ HWTEST_F(L0DebuggerTest, givenBindlessSipWhenModuleHeapDebugAreaIsCreatedThenRes auto mockBlitMemoryToAllocation = [](const NEO::Device &device, NEO::GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> NEO::BlitOperationResult { memcpy(memory->getUnderlyingBuffer(), hostPtr, size.x); - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup( &NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation); @@ -247,7 +247,7 @@ HWTEST_F(L0DebuggerTest, givenUseBindlessDebugSipZeroWhenModuleHeapDebugAreaIsCr auto mockBlitMemoryToAllocation = [](const NEO::Device &device, NEO::GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> NEO::BlitOperationResult { memcpy(memory->getUnderlyingBuffer(), hostPtr, size.x); - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup( &NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation); diff --git a/shared/test/unit_test/device_binary_format/elf/elf_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/elf/elf_decoder_tests.cpp index 00194a5cdd..d1d90a489c 100644 --- a/shared/test/unit_test/device_binary_format/elf/elf_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/elf/elf_decoder_tests.cpp @@ -37,11 +37,11 @@ class TestElf { ElfRela relocationsWithAddend[2]; relocationsWithAddend[0].addend = relaAddend; - relocationsWithAddend[0].info = relaSymbolIndexes[0] << 32 | uint32_t(RELOCATION_X8664_TYPE::R_X8664_64); + relocationsWithAddend[0].info = relaSymbolIndexes[0] << 32 | uint32_t(RELOCATION_X8664_TYPE::relocation64); relocationsWithAddend[0].offset = relaOffsets[0]; relocationsWithAddend[1].addend = relaAddend; - relocationsWithAddend[1].info = relaSymbolIndexes[1] << 32 | uint32_t(RELOCATION_X8664_TYPE::R_X8664_32); + relocationsWithAddend[1].info = relaSymbolIndexes[1] << 32 | uint32_t(RELOCATION_X8664_TYPE::relocation32); relocationsWithAddend[1].offset = relaOffsets[1]; elfEncoder.appendSection(SHT_PROGBITS, SpecialSectionNames::debug, ArrayRef(dummyData, sizeof(dummyData))); @@ -55,10 +55,10 @@ class TestElf { relaDebugSection->info = debugSectionIndex; ElfRel relocations[2]; - relocations[0].info = relSymbolIndex << 32 | uint64_t(RELOCATION_X8664_TYPE::R_X8664_64); + relocations[0].info = relSymbolIndex << 32 | uint64_t(RELOCATION_X8664_TYPE::relocation64); relocations[0].offset = relOffsets[0]; - relocations[1].info = relSymbolIndex << 32 | uint64_t(RELOCATION_X8664_TYPE::R_X8664_64); + relocations[1].info = relSymbolIndex << 32 | uint64_t(RELOCATION_X8664_TYPE::relocation64); relocations[1].offset = relOffsets[1]; elfEncoder.appendSection(SHT_PROGBITS, SpecialSectionNames::line, std::string{"dummy_line_data______________________"}); @@ -536,19 +536,19 @@ TEST(ElfDecoder, GivenElf64WhenExtractingDataFromElfRelocationThenCorrectRelocTy elf.elfFileHeader = &header64; ElfRela rela; - rela.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::R_X8664_64) | decltype(ElfRela::info)(5) << 32; + rela.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::relocation64) | decltype(ElfRela::info)(5) << 32; auto type = elf.extractRelocType(rela); auto symbolIndex = elf.extractSymbolIndex(rela); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_64), type); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation64), type); EXPECT_EQ(5, symbolIndex); ElfRel rel; - rel.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::R_X8664_32) | decltype(ElfRela::info)(6) << 32; + rel.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::relocation32) | decltype(ElfRela::info)(6) << 32; type = elf.extractRelocType(rel); symbolIndex = elf.extractSymbolIndex(rel); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_32), type); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation32), type); EXPECT_EQ(6, symbolIndex); } @@ -558,19 +558,19 @@ TEST(ElfDecoder, GivenElf32WhenExtractingDataFromElfRelocationThenCorrectRelocTy elf.elfFileHeader = &header64; ElfRela rela; - rela.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::R_X8664_32) | decltype(ElfRela::info)(5) << 8; + rela.info = decltype(ElfRela::info)(RELOCATION_X8664_TYPE::relocation32) | decltype(ElfRela::info)(5) << 8; auto type = elf.extractRelocType(rela); auto symbolIndex = elf.extractSymbolIndex(rela); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_32), type); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation32), type); EXPECT_EQ(5, symbolIndex); ElfRel rel; - rel.info = decltype(ElfRel::info)(RELOCATION_X8664_TYPE::R_X8664_32) | decltype(ElfRel::info)(6) << 8; + rel.info = decltype(ElfRel::info)(RELOCATION_X8664_TYPE::relocation32) | decltype(ElfRel::info)(6) << 8; type = elf.extractRelocType(rel); symbolIndex = elf.extractSymbolIndex(rel); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_32), type); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation32), type); EXPECT_EQ(6, symbolIndex); } @@ -693,7 +693,7 @@ TEST(ElfDecoder, GivenElfWithRelocationsWhenDecodedThenCorrectRelocationsAndSymo EXPECT_EQ(testElf.relaAddend, debugRelocations[0].addend); EXPECT_EQ(testElf.relaOffsets[0], debugRelocations[0].offset); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_64), debugRelocations[0].relocType); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation64), debugRelocations[0].relocType); EXPECT_STREQ("global_object_symbol_0", debugRelocations[0].symbolName.c_str()); EXPECT_EQ(7, debugRelocations[0].symbolSectionIndex); EXPECT_EQ(3, debugRelocations[0].symbolTableIndex); @@ -701,7 +701,7 @@ TEST(ElfDecoder, GivenElfWithRelocationsWhenDecodedThenCorrectRelocationsAndSymo EXPECT_EQ(testElf.relaAddend, debugRelocations[1].addend); EXPECT_EQ(testElf.relaOffsets[1], debugRelocations[1].offset); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_32), debugRelocations[1].relocType); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation32), debugRelocations[1].relocType); EXPECT_STREQ("local_function_symbol_1", debugRelocations[1].symbolName.c_str()); EXPECT_EQ(1, debugRelocations[1].symbolSectionIndex); EXPECT_EQ(1, debugRelocations[1].symbolTableIndex); @@ -709,7 +709,7 @@ TEST(ElfDecoder, GivenElfWithRelocationsWhenDecodedThenCorrectRelocationsAndSymo EXPECT_EQ(0u, debugRelocations[2].addend); EXPECT_EQ(testElf.relOffsets[1], debugRelocations[2].offset); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_64), debugRelocations[2].relocType); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation64), debugRelocations[2].relocType); EXPECT_STREQ("section_symbol_2", debugRelocations[2].symbolName.c_str()); EXPECT_EQ(1, debugRelocations[2].symbolSectionIndex); EXPECT_EQ(2, debugRelocations[2].symbolTableIndex); @@ -717,7 +717,7 @@ TEST(ElfDecoder, GivenElfWithRelocationsWhenDecodedThenCorrectRelocationsAndSymo EXPECT_EQ(0u, relocations[0].addend); EXPECT_EQ(testElf.relOffsets[0], relocations[0].offset); - EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::R_X8664_64), relocations[0].relocType); + EXPECT_EQ(uint32_t(RELOCATION_X8664_TYPE::relocation64), relocations[0].relocType); EXPECT_STREQ("section_symbol_2", relocations[0].symbolName.c_str()); EXPECT_EQ(1, relocations[0].symbolSectionIndex); EXPECT_EQ(2, relocations[0].symbolTableIndex); diff --git a/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp b/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp index 0e61747f35..61ac184fd4 100644 --- a/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp +++ b/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp @@ -1097,7 +1097,7 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap return false; } - if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(++lrrCmd, 0, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, true)) { + if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(++lrrCmd, 0, RegisterOffsets::csGprR1, 0, CompareOperation::equal, true)) { return false; } @@ -1166,43 +1166,43 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } auto miAluCmd = reinterpret_cast(++miMathCmd); - if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_2)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr2)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_6)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr6)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_SHL, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeShl, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_7)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr7)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_6, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr6, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOADIND, AluRegisters::R_0, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoadind, AluRegisters::gpr0, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_FENCE_RD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeFenceRd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } @@ -1218,13 +1218,13 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } miPredicate++; - if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(miPredicate, AluRegisters::R_1, false)) { + if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(miPredicate, AluRegisters::gpr1, false)) { return false; } auto cmds = ptrOffset(miPredicate, EncodeMathMMIO::getCmdSizeForIncrementOrDecrement()); - if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(cmds, AluRegisters::R_2, false)) { + if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(cmds, AluRegisters::gpr2, false)) { return false; } @@ -1238,7 +1238,7 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap return false; } - if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(++lrrCmd, 0, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, true)) { + if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(++lrrCmd, 0, RegisterOffsets::csGprR1, 0, CompareOperation::equal, true)) { return false; } @@ -1271,59 +1271,59 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } miAluCmd = reinterpret_cast(++miMathCmd); - if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_1)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr1)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_7)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr7)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_SHL, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeShl, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_7, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr7, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_7)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr7)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOADIND, AluRegisters::R_7, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoadind, AluRegisters::gpr7, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_FENCE_RD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeFenceRd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_6)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr6)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD0, AluRegisters::R_SRCB, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad0, AluRegisters::srcb, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STOREIND, AluRegisters::R_ACCU, AluRegisters::R_7)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStoreind, AluRegisters::accu, AluRegisters::gpr7)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_FENCE_WR, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeFenceWr, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } @@ -1335,14 +1335,14 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } miPredicate++; - if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(miPredicate, AluRegisters::R_2, true)) { + if (!RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(miPredicate, AluRegisters::gpr2, true)) { return false; } cmds = ptrOffset(miPredicate, EncodeMathMMIO::getCmdSizeForIncrementOrDecrement()); if (!RelaxedOrderingCommandsHelper::verifyConditionalRegRegBbStart(cmds, schedulerStartGpuAddress + RelaxedOrderingHelper::StaticSchedulerSizeAndOffsetSection::loopStartSectionStart, - AluRegisters::R_1, AluRegisters::R_2, CompareOperation::NotEqual, false)) { + AluRegisters::gpr1, AluRegisters::gpr2, CompareOperation::notEqual, false)) { return false; } @@ -1364,14 +1364,14 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(++arbCheck, schedulerStartGpuAddress + RelaxedOrderingHelper::StaticSchedulerSizeAndOffsetSection::loopStartSectionStart, - RegisterOffsets::csGprR1, expectedQueueSizeLimit, CompareOperation::GreaterOrEqual, false)) { + RegisterOffsets::csGprR1, expectedQueueSizeLimit, CompareOperation::greaterOrEqual, false)) { return false; } auto conditionalBbStartcmds = ptrOffset(arbCheck, EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataRegBatchBufferStart(false)); if (!RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(conditionalBbStartcmds, schedulerStartGpuAddress + RelaxedOrderingHelper::StaticSchedulerSizeAndOffsetSection::loopStartSectionStart, - RegisterOffsets::csGprR5, 1, CompareOperation::Equal, false)) { + RegisterOffsets::csGprR5, 1, CompareOperation::equal, false)) { return false; } @@ -1398,23 +1398,23 @@ bool DirectSubmissionRelaxedOrderingTests::verifyStaticSchedulerProgramming(Grap } miAluCmd = reinterpret_cast(++miMathCmd); - if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_9)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr9)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_10)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr10)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_0, AluRegisters::R_ACCU)) { + if (!RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr0, AluRegisters::accu)) { return false; } - if (!RelaxedOrderingCommandsHelper::verifyConditionalRegMemBbStart(++miAluCmd, 0, semaphoreGpuVa, RegisterOffsets::csGprR11, CompareOperation::GreaterOrEqual, true)) { + if (!RelaxedOrderingCommandsHelper::verifyConditionalRegMemBbStart(++miAluCmd, 0, semaphoreGpuVa, RegisterOffsets::csGprR11, CompareOperation::greaterOrEqual, true)) { return false; } @@ -1796,25 +1796,25 @@ HWTEST_F(DirectSubmissionRelaxedOrderingTests, whenDispatchingWorkThenDispatchTa } auto miAluCmd = reinterpret_cast(++miMathCmd); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_1)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr1)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_8)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr8)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_SHL, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeShl, AluRegisters::opcodeNone, AluRegisters::opcodeNone)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STORE, AluRegisters::R_8, AluRegisters::R_ACCU)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStore, AluRegisters::gpr8, AluRegisters::accu)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCA, AluRegisters::R_8)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srca, AluRegisters::gpr8)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_LOAD, AluRegisters::R_SRCB, AluRegisters::R_6)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeLoad, AluRegisters::srcb, AluRegisters::gpr6)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_ADD, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeAdd, AluRegisters::opcodeNone, AluRegisters::opcodeNone)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_STOREIND, AluRegisters::R_ACCU, AluRegisters::R_7)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeStoreind, AluRegisters::accu, AluRegisters::gpr7)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::OPCODE_FENCE_WR, AluRegisters::OPCODE_NONE, AluRegisters::OPCODE_NONE)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyAlu(++miAluCmd, AluRegisters::opcodeFenceWr, AluRegisters::opcodeNone, AluRegisters::opcodeNone)); - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(++miAluCmd, AluRegisters::R_1, true)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyIncrementOrDecrement(++miAluCmd, AluRegisters::gpr1, true)); } HWTEST_F(DirectSubmissionRelaxedOrderingTests, givenNotEnoughSpaceForTaskStoreSectionWhenDispatchingThenSwitchRingBuffers) { @@ -1898,7 +1898,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenBbWithStallingCmdsWhenDispa EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataRegBatchBufferStart(false); uint64_t expectedJumpAddress = directSubmission.ringCommandStream.getGpuBase() + offset + jumpOffset; - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(startAddress, expectedJumpAddress, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(startAddress, expectedJumpAddress, RegisterOffsets::csGprR1, 0, CompareOperation::equal, false)); HardwareParse hwParse; hwParse.parseCommands(directSubmission.ringCommandStream, offset + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataRegBatchBufferStart(false)); @@ -1999,7 +1999,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, whenStoppingRingThenProgramSched EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataRegBatchBufferStart(false); uint64_t expectedJumpAddress = directSubmission.ringCommandStream.getGpuBase() + offset + jumpOffset; - EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(startAddress, expectedJumpAddress, RegisterOffsets::csGprR1, 0, CompareOperation::Equal, false)); + EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataRegBbStart(startAddress, expectedJumpAddress, RegisterOffsets::csGprR1, 0, CompareOperation::equal, false)); HardwareParse hwParse; hwParse.parseCommands(directSubmission.ringCommandStream, offset + EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataRegBatchBufferStart(false)); diff --git a/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp b/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp index 4115354b7c..8887c3e864 100644 --- a/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp +++ b/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp @@ -229,7 +229,7 @@ HWTEST_F(DrmDirectSubmissionTest, givenPciBarrierWhenCreateDirectSubmissionThenP MockDrmDirectSubmission> directSubmission(commandStreamReceiver); EXPECT_NE(nullptr, directSubmission.pciBarrierPtr); - EXPECT_NE(DirectSubmissionSfenceMode::Disabled, directSubmission.sfenceMode); + EXPECT_NE(DirectSubmissionSfenceMode::disabled, directSubmission.sfenceMode); EXPECT_FALSE(directSubmission.miMemFenceRequired); SysCalls::munmap(ptr, MemoryConstants::pageSize); @@ -250,7 +250,7 @@ HWTEST_F(DrmDirectSubmissionTest, givenPciBarrierWhenCreateDirectSubmissionAndMm MockDrmDirectSubmission> directSubmission(commandStreamReceiver); EXPECT_EQ(nullptr, directSubmission.pciBarrierPtr); - EXPECT_NE(DirectSubmissionSfenceMode::Disabled, directSubmission.sfenceMode); + EXPECT_NE(DirectSubmissionSfenceMode::disabled, directSubmission.sfenceMode); auto expectMiMemFence = device->getHardwareInfo().capabilityTable.isIntegratedDevice ? false : device->getRootDeviceEnvironment().getHelper().isGlobalFenceInDirectSubmissionRequired(device->getHardwareInfo()); EXPECT_EQ(directSubmission.miMemFenceRequired, expectMiMemFence); @@ -271,7 +271,7 @@ HWTEST_F(DrmDirectSubmissionTest, givenPciBarrierDisabledWhenCreateDirectSubmiss MockDrmDirectSubmission> directSubmission(commandStreamReceiver); EXPECT_EQ(nullptr, directSubmission.pciBarrierPtr); - EXPECT_NE(DirectSubmissionSfenceMode::Disabled, directSubmission.sfenceMode); + EXPECT_NE(DirectSubmissionSfenceMode::disabled, directSubmission.sfenceMode); auto expectMiMemFence = device->getHardwareInfo().capabilityTable.isIntegratedDevice ? false : device->getRootDeviceEnvironment().getHelper().isGlobalFenceInDirectSubmissionRequired(device->getHardwareInfo()); EXPECT_EQ(directSubmission.miMemFenceRequired, expectMiMemFence); diff --git a/shared/test/unit_test/encoders/test_encode_math.cpp b/shared/test/unit_test/encoders/test_encode_math.cpp index cf0c7fb315..f48738c60b 100644 --- a/shared/test/unit_test/encoders/test_encode_math.cpp +++ b/shared/test/unit_test/encoders/test_encode_math.cpp @@ -21,9 +21,9 @@ HWTEST_F(EncodeMathMMIOTest, WhenEncodingAluThenCorrectOpcodesOperandsAdded) { using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; MI_MATH_ALU_INST_INLINE aluParam[5]; - AluRegisters regA = AluRegisters::R_0; - AluRegisters regB = AluRegisters::R_1; - AluRegisters finalResultRegister = AluRegisters::R_2; + AluRegisters regA = AluRegisters::gpr0; + AluRegisters regB = AluRegisters::gpr1; + AluRegisters finalResultRegister = AluRegisters::gpr2; memset(aluParam, 0, sizeof(MI_MATH_ALU_INST_INLINE) * 5); @@ -31,29 +31,29 @@ HWTEST_F(EncodeMathMMIOTest, WhenEncodingAluThenCorrectOpcodesOperandsAdded) { finalResultRegister); EXPECT_EQ(aluParam[0].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCA)); + static_cast(AluRegisters::srca)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand2, static_cast(regA)); EXPECT_EQ(aluParam[1].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCB)); + static_cast(AluRegisters::srcb)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand2, static_cast(regB)); EXPECT_EQ(aluParam[2].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_ADD)); + static_cast(AluRegisters::opcodeAdd)); EXPECT_EQ(aluParam[2].DW0.BitField.Operand1, 0u); EXPECT_EQ(aluParam[2].DW0.BitField.Operand2, 0u); EXPECT_EQ(aluParam[3].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_STORE)); + static_cast(AluRegisters::opcodeStore)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand1, - static_cast(AluRegisters::R_2)); + static_cast(AluRegisters::gpr2)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand2, - static_cast(AluRegisters::R_ACCU)); + static_cast(AluRegisters::accu)); EXPECT_EQ(aluParam[4].DW0.Value, 0u); } @@ -62,9 +62,9 @@ HWTEST_F(EncodeMathMMIOTest, WhenEncodingAluSubStoreCarryThenCorrectOpcodesOpera using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; MI_MATH_ALU_INST_INLINE aluParam[5]; - AluRegisters regA = AluRegisters::R_0; - AluRegisters regB = AluRegisters::R_1; - AluRegisters finalResultRegister = AluRegisters::R_2; + AluRegisters regA = AluRegisters::gpr0; + AluRegisters regB = AluRegisters::gpr1; + AluRegisters finalResultRegister = AluRegisters::gpr2; memset(aluParam, 0, sizeof(MI_MATH_ALU_INST_INLINE) * 5); @@ -72,30 +72,30 @@ HWTEST_F(EncodeMathMMIOTest, WhenEncodingAluSubStoreCarryThenCorrectOpcodesOpera finalResultRegister); EXPECT_EQ(aluParam[0].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCA)); + static_cast(AluRegisters::srca)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand2, static_cast(regA)); EXPECT_EQ(aluParam[1].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCB)); + static_cast(AluRegisters::srcb)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand2, static_cast(regB)); EXPECT_EQ(aluParam[2].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); EXPECT_EQ(aluParam[2].DW0.BitField.Operand1, 0u); EXPECT_EQ(aluParam[2].DW0.BitField.Operand2, 0u); EXPECT_EQ(aluParam[3].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_STORE)); + static_cast(AluRegisters::opcodeStore)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand1, - static_cast(AluRegisters::R_2)); + static_cast(AluRegisters::gpr2)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand2, - static_cast(AluRegisters::R_CF)); + static_cast(AluRegisters::cf)); EXPECT_EQ(aluParam[4].DW0.Value, 0u); } @@ -104,9 +104,9 @@ HWTEST_F(EncodeMathMMIOTest, givenAluRegistersWhenEncodeAluAndIsCalledThenAluPar using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; MI_MATH_ALU_INST_INLINE aluParam[5]; - AluRegisters regA = AluRegisters::R_0; - AluRegisters regB = AluRegisters::R_1; - AluRegisters finalResultRegister = AluRegisters::R_2; + AluRegisters regA = AluRegisters::gpr0; + AluRegisters regB = AluRegisters::gpr1; + AluRegisters finalResultRegister = AluRegisters::gpr2; memset(aluParam, 0, sizeof(MI_MATH_ALU_INST_INLINE) * 5); @@ -114,29 +114,29 @@ HWTEST_F(EncodeMathMMIOTest, givenAluRegistersWhenEncodeAluAndIsCalledThenAluPar finalResultRegister); EXPECT_EQ(aluParam[0].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCA)); + static_cast(AluRegisters::srca)); EXPECT_EQ(aluParam[0].DW0.BitField.Operand2, static_cast(regA)); EXPECT_EQ(aluParam[1].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_LOAD)); + static_cast(AluRegisters::opcodeLoad)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand1, - static_cast(AluRegisters::R_SRCB)); + static_cast(AluRegisters::srcb)); EXPECT_EQ(aluParam[1].DW0.BitField.Operand2, static_cast(regB)); EXPECT_EQ(aluParam[2].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_AND)); + static_cast(AluRegisters::opcodeAnd)); EXPECT_EQ(aluParam[2].DW0.BitField.Operand1, 0u); EXPECT_EQ(aluParam[2].DW0.BitField.Operand2, 0u); EXPECT_EQ(aluParam[3].DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_STORE)); + static_cast(AluRegisters::opcodeStore)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand1, - static_cast(AluRegisters::R_2)); + static_cast(AluRegisters::gpr2)); EXPECT_EQ(aluParam[3].DW0.BitField.Operand2, - static_cast(AluRegisters::R_ACCU)); + static_cast(AluRegisters::accu)); EXPECT_EQ(aluParam[4].DW0.Value, 0u); } @@ -289,7 +289,7 @@ HWTEST_F(CommandEncodeAluTests, whenProgrammingIncrementOperationThenUseCorrectA using MI_MATH = typename FamilyType::MI_MATH; constexpr size_t bufferSize = EncodeMathMMIO::getCmdSizeForIncrementOrDecrement(); - constexpr AluRegisters incRegister = AluRegisters::R_1; + constexpr AluRegisters incRegister = AluRegisters::gpr1; uint8_t buffer[bufferSize] = {}; LinearStream cmdStream(buffer, bufferSize); @@ -310,24 +310,24 @@ HWTEST_F(CommandEncodeAluTests, whenProgrammingIncrementOperationThenUseCorrectA EXPECT_EQ(3u, miMathCmd->DW0.BitField.DwordLength); auto miAluCmd = reinterpret_cast(++miMathCmd); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCA), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srca), miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(static_cast(incRegister), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCB), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srcb), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_ADD), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeAdd), miAluCmd->DW0.BitField.ALUOpcode); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_STORE), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeStore), miAluCmd->DW0.BitField.ALUOpcode); EXPECT_EQ(static_cast(incRegister), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_ACCU), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::accu), miAluCmd->DW0.BitField.Operand2); } HWTEST_F(CommandEncodeAluTests, whenProgrammingDecrementOperationThenUseCorrectAluCommands) { @@ -336,7 +336,7 @@ HWTEST_F(CommandEncodeAluTests, whenProgrammingDecrementOperationThenUseCorrectA using MI_MATH = typename FamilyType::MI_MATH; constexpr size_t bufferSize = EncodeMathMMIO::getCmdSizeForIncrementOrDecrement(); - constexpr AluRegisters decRegister = AluRegisters::R_1; + constexpr AluRegisters decRegister = AluRegisters::gpr1; uint8_t buffer[bufferSize] = {}; LinearStream cmdStream(buffer, bufferSize); @@ -357,22 +357,22 @@ HWTEST_F(CommandEncodeAluTests, whenProgrammingDecrementOperationThenUseCorrectA EXPECT_EQ(3u, miMathCmd->DW0.BitField.DwordLength); auto miAluCmd = reinterpret_cast(++miMathCmd); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCA), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srca), miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(static_cast(decRegister), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCB), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srcb), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_SUB), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeSub), miAluCmd->DW0.BitField.ALUOpcode); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_STORE), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeStore), miAluCmd->DW0.BitField.ALUOpcode); EXPECT_EQ(static_cast(decRegister), miAluCmd->DW0.BitField.Operand1); - EXPECT_EQ(static_cast(AluRegisters::R_ACCU), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::accu), miAluCmd->DW0.BitField.Operand2); } \ No newline at end of file diff --git a/shared/test/unit_test/encoders/test_encode_math_xehp_and_later.cpp b/shared/test/unit_test/encoders/test_encode_math_xehp_and_later.cpp index 70e1dc1b9f..78ff83bf58 100644 --- a/shared/test/unit_test/encoders/test_encode_math_xehp_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_math_xehp_and_later.cpp @@ -64,5 +64,5 @@ HWTEST2_F(XeHPAndLaterCommandEncoderMathTest, WhenAppendsAGreaterThanThenPredica auto cmdALU = reinterpret_cast(cmdMATH + 3); EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); } diff --git a/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp b/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp index b1de2e7482..a795a874d6 100644 --- a/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_pvc_and_later.cpp @@ -41,27 +41,27 @@ struct EncodeConditionalBatchBufferStartTest : public ::testing::Test { EXPECT_EQ(3u, miMathCmd->DW0.BitField.DwordLength); auto miAluCmd = reinterpret_cast(++miMathCmd); - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCA), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srca), miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(static_cast(regA), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_SRCB), miAluCmd->DW0.BitField.Operand1); + EXPECT_EQ(static_cast(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::srcb), miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(static_cast(regB), miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_SUB), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::opcodeSub), miAluCmd->DW0.BitField.ALUOpcode); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand1); EXPECT_EQ(0u, miAluCmd->DW0.BitField.Operand2); miAluCmd++; - EXPECT_EQ(static_cast(AluRegisters::OPCODE_STORE), miAluCmd->DW0.BitField.ALUOpcode); - EXPECT_EQ(static_cast(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand1); - if (compareOperation == CompareOperation::Equal || compareOperation == CompareOperation::NotEqual) { - EXPECT_EQ(static_cast(AluRegisters::R_ZF), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::opcodeStore), miAluCmd->DW0.BitField.ALUOpcode); + EXPECT_EQ(static_cast(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand1); + if (compareOperation == CompareOperation::equal || compareOperation == CompareOperation::notEqual) { + EXPECT_EQ(static_cast(AluRegisters::zf), miAluCmd->DW0.BitField.Operand2); } else { - EXPECT_EQ(static_cast(AluRegisters::R_CF), miAluCmd->DW0.BitField.Operand2); + EXPECT_EQ(static_cast(AluRegisters::cf), miAluCmd->DW0.BitField.Operand2); } auto lrrCmd = reinterpret_cast(++miAluCmd); @@ -69,7 +69,7 @@ struct EncodeConditionalBatchBufferStartTest : public ::testing::Test { EXPECT_EQ(RegisterOffsets::csGprR7, lrrCmd->getSourceRegisterAddress()); auto predicateCmd = reinterpret_cast(++lrrCmd); - if (compareOperation == CompareOperation::Equal) { + if (compareOperation == CompareOperation::equal) { EXPECT_EQ(static_cast(MiPredicateType::noopOnResult2Clear), predicateCmd->getPredicateEnable()); } else { EXPECT_EQ(static_cast(MiPredicateType::noopOnResult2Set), predicateCmd->getPredicateEnable()); @@ -102,7 +102,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgrammingConditionalDataM constexpr uint64_t compareAddress = 0x56780000; constexpr uint32_t compareData = 9876; - for (auto compareOperation : {CompareOperation::Equal, CompareOperation::NotEqual, CompareOperation::GreaterOrEqual}) { + for (auto compareOperation : {CompareOperation::equal, CompareOperation::notEqual, CompareOperation::greaterOrEqual}) { for (bool indirect : {false, true}) { uint8_t buffer[expectedSize] = {}; LinearStream cmdStream(buffer, expectedSize); @@ -127,7 +127,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgrammingConditionalDataM EXPECT_EQ(RegisterOffsets::csGprR8 + 4, lriCmd->getRegisterOffset()); EXPECT_EQ(0u, lriCmd->getDataDword()); - validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } } } @@ -147,7 +147,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgramming64bConditionalDa constexpr uint64_t compareAddress = 0x56780000; constexpr uint64_t compareData = 0x12345678'12345678; - for (auto compareOperation : {CompareOperation::Equal, CompareOperation::NotEqual, CompareOperation::GreaterOrEqual}) { + for (auto compareOperation : {CompareOperation::equal, CompareOperation::notEqual, CompareOperation::greaterOrEqual}) { for (bool indirect : {false, true}) { uint8_t buffer[expectedSize] = {}; LinearStream cmdStream(buffer, expectedSize); @@ -172,7 +172,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgramming64bConditionalDa EXPECT_EQ(RegisterOffsets::csGprR8 + 4, lriCmd->getRegisterOffset()); EXPECT_EQ(static_cast(compareData >> 32), lriCmd->getDataDword()); - validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } } } @@ -192,7 +192,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgrammingConditionalDataR constexpr uint32_t compareReg = RegisterOffsets::csGprR1; constexpr uint32_t compareData = 9876; - for (auto compareOperation : {CompareOperation::Equal, CompareOperation::NotEqual, CompareOperation::GreaterOrEqual}) { + for (auto compareOperation : {CompareOperation::equal, CompareOperation::notEqual, CompareOperation::greaterOrEqual}) { for (bool indirect : {false, true}) { uint8_t buffer[expectedSize] = {}; LinearStream cmdStream(buffer, expectedSize); @@ -217,7 +217,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgrammingConditionalDataR EXPECT_EQ(RegisterOffsets::csGprR8 + 4, lriCmd->getRegisterOffset()); EXPECT_EQ(0u, lriCmd->getDataDword()); - validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } } } @@ -237,7 +237,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgramming64bConditionalDa constexpr uint32_t compareReg = RegisterOffsets::csGprR1; constexpr uint64_t compareData = 0x12345678'12345678; - for (auto compareOperation : {CompareOperation::Equal, CompareOperation::NotEqual, CompareOperation::GreaterOrEqual}) { + for (auto compareOperation : {CompareOperation::equal, CompareOperation::notEqual, CompareOperation::greaterOrEqual}) { for (bool indirect : {false, true}) { uint8_t buffer[expectedSize] = {}; LinearStream cmdStream(buffer, expectedSize); @@ -262,7 +262,7 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgramming64bConditionalDa EXPECT_EQ(RegisterOffsets::csGprR8 + 4, lriCmd->getRegisterOffset()); EXPECT_EQ(static_cast(compareData >> 32), lriCmd->getDataDword()); - validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::R_7, AluRegisters::R_8); + validateBaseProgramming(++lriCmd, compareOperation, startAddress, indirect, AluRegisters::gpr7, AluRegisters::gpr8); } } } @@ -276,10 +276,10 @@ HWTEST2_F(EncodeConditionalBatchBufferStartTest, whenProgrammingConditionalRegRe EXPECT_EQ(expectedSize, EncodeBatchBufferStartOrEnd::getCmdSizeConditionalRegRegBatchBufferStart()); constexpr uint64_t startAddress = 0x12340000; - constexpr AluRegisters compareReg1 = AluRegisters::R_1; - constexpr AluRegisters compareReg2 = AluRegisters::R_2; + constexpr AluRegisters compareReg1 = AluRegisters::gpr1; + constexpr AluRegisters compareReg2 = AluRegisters::gpr2; - for (auto compareOperation : {CompareOperation::Equal, CompareOperation::NotEqual, CompareOperation::GreaterOrEqual}) { + for (auto compareOperation : {CompareOperation::equal, CompareOperation::notEqual, CompareOperation::greaterOrEqual}) { for (bool indirect : {false, true}) { uint8_t buffer[expectedSize] = {}; LinearStream cmdStream(buffer, expectedSize); diff --git a/shared/test/unit_test/gen11/test_encode_math_gen11.cpp b/shared/test/unit_test/gen11/test_encode_math_gen11.cpp index f8c824b4dc..6f13515cc3 100644 --- a/shared/test/unit_test/gen11/test_encode_math_gen11.cpp +++ b/shared/test/unit_test/gen11/test_encode_math_gen11.cpp @@ -65,5 +65,5 @@ GEN11TEST_F(CommandEncoderMathTestGen11, WhenAppendsAGreaterThanThenPredicateCor auto cmdALU = reinterpret_cast(cmdMATH + 3); EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); } diff --git a/shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp index e5a91a0017..a6d2ac4dab 100644 --- a/shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp @@ -64,5 +64,5 @@ GEN12LPTEST_F(CommandEncoderMathTestGen12Lp, WhenAppendsAGreaterThanThenPredicat auto cmdALU = reinterpret_cast(cmdMATH + 3); EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); } diff --git a/shared/test/unit_test/gen8/test_encode_math_gen8.cpp b/shared/test/unit_test/gen8/test_encode_math_gen8.cpp index b2ea7abeb0..d0ff5b26fd 100644 --- a/shared/test/unit_test/gen8/test_encode_math_gen8.cpp +++ b/shared/test/unit_test/gen8/test_encode_math_gen8.cpp @@ -65,5 +65,5 @@ GEN8TEST_F(CommandEncoderMathTestGen8, WhenAppendsAGreaterThanThenPredicateCorre auto cmdALU = reinterpret_cast(cmdMATH + 3); EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); } diff --git a/shared/test/unit_test/gen9/test_encode_math_gen9.cpp b/shared/test/unit_test/gen9/test_encode_math_gen9.cpp index 25b39b007f..31e767898e 100644 --- a/shared/test/unit_test/gen9/test_encode_math_gen9.cpp +++ b/shared/test/unit_test/gen9/test_encode_math_gen9.cpp @@ -65,5 +65,5 @@ GEN9TEST_F(CommandEncoderMathTestGen9, WhenAppendsAGreaterThanThenPredicateCorre auto cmdALU = reinterpret_cast(cmdMATH + 3); EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::OPCODE_SUB)); + static_cast(AluRegisters::opcodeSub)); } diff --git a/shared/test/unit_test/memory_manager/memory_manager_tests.cpp b/shared/test/unit_test/memory_manager/memory_manager_tests.cpp index 3c13375494..c8a273e075 100644 --- a/shared/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/shared/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -3016,7 +3016,7 @@ TEST(MemoryTransferHelperTest, WhenBlitterIsSelectedButBlitCopyFailsThenFallback auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo)); - EXPECT_EQ(BlitOperationResult::Unsupported, BlitHelperFunctions::blitMemoryToAllocation(*device, &graphicsAllocation, 0, srcData, {dataSize, 1, 1})); + EXPECT_EQ(BlitOperationResult::unsupported, BlitHelperFunctions::blitMemoryToAllocation(*device, &graphicsAllocation, 0, srcData, {dataSize, 1, 1})); auto result = MemoryTransferHelper::transferMemoryToAllocation(true, *device, &graphicsAllocation, 0u, srcData, dataSize); EXPECT_TRUE(result); @@ -3041,7 +3041,7 @@ TEST(MemoryTransferHelperTest, givenBlitOperationSupportedWhenBcsEngineNotAvaila auto bcsEngine = device->tryGetEngine(aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular); EXPECT_EQ(nullptr, bcsEngine); - EXPECT_EQ(BlitOperationResult::Unsupported, BlitHelperFunctions::blitMemoryToAllocation(*device, &graphicsAllocation, 0, srcData, {dataSize, 1, 1})); + EXPECT_EQ(BlitOperationResult::unsupported, BlitHelperFunctions::blitMemoryToAllocation(*device, &graphicsAllocation, 0, srcData, {dataSize, 1, 1})); } TEST(MemoryManagerTest, givenMemoryManagerWithLocalMemoryWhenCreatingMultiGraphicsAllocationInSystemMemoryThenForceSystemMemoryPlacement) { diff --git a/shared/test/unit_test/program/program_initialization_tests.cpp b/shared/test/unit_test/program/program_initialization_tests.cpp index 90956cc118..4ac48b58e5 100644 --- a/shared/test/unit_test/program/program_initialization_tests.cpp +++ b/shared/test/unit_test/program/program_initialization_tests.cpp @@ -205,7 +205,7 @@ TEST(AllocateGlobalSurfaceTest, GivenAllocationInLocalMemoryWhichRequiresBlitter auto mockBlitMemoryToAllocation = [&blitsCounter](const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size) -> BlitOperationResult { blitsCounter++; - return BlitOperationResult::Success; + return BlitOperationResult::success; }; VariableBackup blitMemoryToAllocationFuncBackup{ &BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation};