mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
refactor: correct naming of enum class constants 9/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c612a86d28
commit
a6458433dc
@@ -2423,7 +2423,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendWaitOnInOrderDependency(std::sh
|
||||
|
||||
for (uint32_t i = 0; i < inOrderExecInfo->getNumDevicePartitionsToWait(); i++) {
|
||||
if (relaxedOrderingAllowed) {
|
||||
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddress, waitValue, NEO::CompareOperation::Less, true, isQwordInOrderCounter());
|
||||
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::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<gfxCoreFamily>::isAppendSplitNeeded(NEO::Memor
|
||||
|
||||
return this->isBcsSplitNeeded &&
|
||||
size >= minimalSizeForBcsSplit &&
|
||||
directionOut != NEO::TransferDirection::LocalToLocal;
|
||||
directionOut != NEO::TransferDirection::localToLocal;
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
@@ -3629,7 +3629,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendWaitOnSingleEvent(Event *event,
|
||||
for (uint32_t i = 0u; i < packetsToWait; i++) {
|
||||
if (relaxedOrderingAllowed) {
|
||||
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddr, Event::STATE_CLEARED,
|
||||
NEO::CompareOperation::Equal, true, false);
|
||||
NEO::CompareOperation::equal, true, false);
|
||||
} else {
|
||||
NEO::EncodeSemaphore<GfxFamily>::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(),
|
||||
gpuAddr,
|
||||
|
||||
@@ -105,9 +105,9 @@ void BcsSplit::releaseResources() {
|
||||
}
|
||||
|
||||
std::vector<CommandQueue *> &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;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ bool ModuleTranslationUnit::processSpecConstantInfo(NEO::CompilerInterface *comp
|
||||
if (pConstants) {
|
||||
NEO::SpecConstantInfo specConstInfo;
|
||||
auto retVal = compilerInterface->getSpecConstantsInfo(*device->getNEODevice(), ArrayRef<const char>(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<std::string> 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 {
|
||||
|
||||
@@ -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<uint32_t> 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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1777,7 +1777,7 @@ HWTEST2_F(CommandListCreate, givenInOrderExecutionWhenDispatchingRelaxedOrdering
|
||||
lrrCmd++;
|
||||
|
||||
EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart<FamilyType>(lrrCmd, 0, cmdList->inOrderExecInfo->getDeviceCounterAllocation().getGpuAddress(), 2,
|
||||
NEO::CompareOperation::Less, true, cmdList->isQwordInOrderCounter()));
|
||||
NEO::CompareOperation::less, true, cmdList->isQwordInOrderCounter()));
|
||||
}
|
||||
|
||||
TEST_F(CommandListCreate, GivenGpuHangWhenCreatingImmCmdListWithSyncModeAndAppendBarrierThenAppendBarrierReturnsDeviceLost) {
|
||||
|
||||
@@ -2377,7 +2377,7 @@ HWTEST2_F(InOrderCmdListTests, givenRelaxedOrderingWhenProgrammingTimestampEvent
|
||||
auto eventEndGpuVa = events[0]->getCompletionFieldGpuAddress(device);
|
||||
|
||||
EXPECT_TRUE(RelaxedOrderingCommandsHelper::verifyConditionalDataMemBbStart<FamilyType>(lrrCmd, 0, eventEndGpuVa, static_cast<uint64_t>(Event::STATE_CLEARED),
|
||||
NEO::CompareOperation::Equal, true, false));
|
||||
NEO::CompareOperation::equal, true, false));
|
||||
|
||||
auto sdiCmd = genCmdCast<MI_STORE_DATA_IMM *>(ptrOffset(lrrCmd, EncodeBatchBufferStartOrEnd<FamilyType>::getCmdSizeConditionalDataMemBatchBufferStart(false)));
|
||||
ASSERT_NE(nullptr, sdiCmd);
|
||||
|
||||
@@ -131,24 +131,24 @@ HWTEST2_F(CommandListAppendWaitOnEvent, givenImmediateCmdListWithDirectSubmissio
|
||||
EXPECT_EQ(miMathCmd->DW0.BitField.DwordLength, 3u);
|
||||
|
||||
auto miAluCmd = reinterpret_cast<MI_MATH_ALU_INST_INLINE *>(++miMathCmd);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_SRCA), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand2);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::srca), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand2);
|
||||
|
||||
miAluCmd++;
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_LOAD), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_SRCB), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_8), miAluCmd->DW0.BitField.Operand2);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeLoad), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::srcb), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::gpr8), miAluCmd->DW0.BitField.Operand2);
|
||||
|
||||
miAluCmd++;
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_SUB), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_NONE), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_NONE), miAluCmd->DW0.BitField.Operand2);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeSub), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeNone), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeNone), miAluCmd->DW0.BitField.Operand2);
|
||||
|
||||
miAluCmd++;
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::OPCODE_STORE), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_7), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::R_ZF), miAluCmd->DW0.BitField.Operand2);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::opcodeStore), miAluCmd->DW0.BitField.ALUOpcode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::gpr7), miAluCmd->DW0.BitField.Operand1);
|
||||
EXPECT_EQ(static_cast<uint32_t>(AluRegisters::zf), miAluCmd->DW0.BitField.Operand2);
|
||||
|
||||
lrrCmd = reinterpret_cast<MI_LOAD_REGISTER_REG *>(++miAluCmd);
|
||||
EXPECT_EQ(lrrCmd->getSourceRegisterAddress(), RegisterOffsets::csGprR7);
|
||||
|
||||
@@ -189,7 +189,7 @@ HWTEST_F(ModuleTest, givenBlitterAvailableWhenCopyingPatchedSegmentsThenIsaIsTra
|
||||
Vec3<size_t> size) -> NEO::BlitOperationResult {
|
||||
memcpy(memory->getUnderlyingBuffer(), hostPtr, size.x);
|
||||
blitterCalled++;
|
||||
return BlitOperationResult::Success;
|
||||
return BlitOperationResult::success;
|
||||
};
|
||||
VariableBackup<NEO::BlitHelperFunctions::BlitMemoryToAllocationFunc> blitMemoryToAllocationFuncBackup(
|
||||
&NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation);
|
||||
@@ -769,7 +769,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler
|
||||
FailingMockCompilerInterfaceWithSpecConstants(uint32_t moduleNumSpecConstants) : MockCompilerInterfaceWithSpecConstants<uint32_t, uint64_t>(moduleNumSpecConstants) {}
|
||||
NEO::TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device,
|
||||
ArrayRef<const char> 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<uint32_t, uint64_t>(moduleNumSpecConstants) {}
|
||||
NEO::TranslationOutput::ErrorCode getSpecConstantsInfo(const NEO::Device &device,
|
||||
ArrayRef<const char> srcSpirV, NEO::SpecConstantInfo &output) override {
|
||||
return NEO::TranslationOutput::ErrorCode::CompilerNotAvailable;
|
||||
return NEO::TranslationOutput::ErrorCode::compilerNotAvailable;
|
||||
}
|
||||
};
|
||||
mockCompiler = new FailingMockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants);
|
||||
|
||||
Reference in New Issue
Block a user