refactor: correct typo

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk 2025-02-17 14:44:07 +00:00 committed by Compute-Runtime-Automation
parent d65b96be4e
commit b1ffe640bb
10 changed files with 41 additions and 41 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -64,10 +64,10 @@ Program::Program(Context *context, bool isBuiltIn, const ClDeviceVector &clDevic
std::string Program::getInternalOptions() const {
auto pClDevice = clDevices[0];
auto force32BitAddressess = pClDevice->getSharedDeviceInfo().force32BitAddressess;
auto force32BitAddresses = pClDevice->getSharedDeviceInfo().force32BitAddresses;
auto internalOptions = getOclVersionCompilerInternalOption(pClDevice->getEnabledClVersion());
if (force32BitAddressess && !isBuiltIn) {
if (force32BitAddresses && !isBuiltIn) {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::arch32bit);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -1833,8 +1833,8 @@ TEST_F(BuiltInTests, GivenInvalidBuiltinWhenCreatingProgramFromCodeThenNullPoint
}
TEST_F(BuiltInTests, GivenForce32bitWhenCreatingProgramThenCorrectKernelIsCreated) {
bool force32BitAddressess = pDevice->getDeviceInfo().force32BitAddressess;
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddressess = true;
bool force32BitAddresses = pDevice->getDeviceInfo().force32BitAddresses;
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddresses = true;
auto builtinsLib = std::unique_ptr<BuiltinsLib>(new BuiltinsLib());
const BuiltinCode bc = builtinsLib->getBuiltinCode(EBuiltInOps::copyBufferToBuffer, BuiltinCode::ECodeType::source, *pDevice);
@ -1854,7 +1854,7 @@ TEST_F(BuiltInTests, GivenForce32bitWhenCreatingProgramThenCorrectKernelIsCreate
EXPECT_EQ(std::string::npos, it);
}
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddressess = force32BitAddressess;
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddresses = force32BitAddresses;
}
TEST_F(BuiltInTests, WhenGettingSipKernelThenReturnProgramCreatedFromIsaAcquiredThroughCompilerInterface) {

View File

@ -738,13 +738,13 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
auto deviceInfo = pClDevice->getDeviceInfo();
auto sharedDeviceInfo = pDevice->getDeviceInfo();
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
commandQueue.enqueueKernel(kernel, 1, nullptr, &gws, nullptr, 0, nullptr, nullptr);
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_TRUE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
@ -766,7 +766,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
// Get address ( offset in 32 bit addressing ) of sratch
graphicsAddress = (uint64_t)graphicsAllocationScratch->getGpuAddressToPatch();
if (sharedDeviceInfo.force32BitAddressess && is64bit) {
if (sharedDeviceInfo.force32BitAddresses && is64bit) {
EXPECT_TRUE(graphicsAllocationScratch->is32BitAllocation());
auto gmmHelper = pDevice->getGmmHelper();
@ -784,7 +784,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
uint64_t scratchBaseLowPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointer();
uint64_t scratchBaseHighPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointerHigh();
if (is64bit && !sharedDeviceInfo.force32BitAddressess) {
if (is64bit && !sharedDeviceInfo.force32BitAddresses) {
uint64_t expectedAddress = ScratchSpaceConstants::scratchSpaceOffsetFor64Bit;
EXPECT_EQ(expectedAddress, scratchBaseLowPart);
EXPECT_EQ(0u, scratchBaseHighPart);
@ -793,7 +793,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
EXPECT_EQ(highPartGraphicsAddress, scratchBaseHighPart);
}
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex(), false), gsHaddress);
} else {
if constexpr (is64bit) {
@ -815,7 +815,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
itorCmdForStateBase = find<STATE_BASE_ADDRESS *>(itorWalker, cmdList.end());
// In 32 Bit addressing sba shouldn't be reprogrammed
if (sharedDeviceInfo.force32BitAddressess == true) {
if (sharedDeviceInfo.force32BitAddresses == true) {
EXPECT_EQ(itorCmdForStateBase, cmdList.end());
}
@ -827,7 +827,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenTwoCons
uint64_t oldScratchAddr = ((uint64_t)scratchBaseHighPart << 32u) | scratchBaseLowPart;
uint64_t newScratchAddr = ((uint64_t)cmdMediaVfeStateSecond->getScratchSpaceBasePointerHigh() << 32u) | cmdMediaVfeStateSecond->getScratchSpaceBasePointer();
if (sharedDeviceInfo.force32BitAddressess == true) {
if (sharedDeviceInfo.force32BitAddresses == true) {
EXPECT_NE(oldScratchAddr, newScratchAddr);
}
}
@ -852,13 +852,13 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
auto deviceInfo = pClDevice->getDeviceInfo();
auto sharedDeviceInfo = pDevice->getDeviceInfo();
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
commandQueue.enqueueKernel(kernel, 1, nullptr, &gws, nullptr, 0, nullptr, nullptr);
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_TRUE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
@ -880,7 +880,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
// Get address ( offset in 32 bit addressing ) of sratch
graphicsAddress = (uint64_t)graphicsAllocationScratch->getGpuAddressToPatch();
if (sharedDeviceInfo.force32BitAddressess && is64bit) {
if (sharedDeviceInfo.force32BitAddresses && is64bit) {
EXPECT_TRUE(graphicsAllocationScratch->is32BitAllocation());
auto gmmHelper = pDevice->getGmmHelper();
@ -898,7 +898,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
uint64_t scratchBaseLowPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointer();
uint64_t scratchBaseHighPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointerHigh();
if (is64bit && !sharedDeviceInfo.force32BitAddressess) {
if (is64bit && !sharedDeviceInfo.force32BitAddresses) {
lowPartGraphicsAddress = ScratchSpaceConstants::scratchSpaceOffsetFor64Bit;
highPartGraphicsAddress = 0u;
}
@ -906,7 +906,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
EXPECT_EQ(lowPartGraphicsAddress, scratchBaseLowPart);
EXPECT_EQ(highPartGraphicsAddress, scratchBaseHighPart);
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex(), false), gsHaddress);
} else {
if constexpr (is64bit) {
@ -929,7 +929,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
itorCmdForStateBase = find<STATE_BASE_ADDRESS *>(itorWalker, cmdList.end());
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_NE(itorWalker, itorCmdForStateBase);
if (itorCmdForStateBase != cmdList.end()) {
@ -940,14 +940,14 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNdRange
EXPECT_NE(sba, sba2);
EXPECT_EQ(0u, gsHaddress2);
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
}
}
delete buffer;
if (sharedDeviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddresses) {
// Asserts placed after restoring old CSR to avoid heap corruption
ASSERT_NE(itorCmdForStateBase, cmdList.end());
}

View File

@ -280,7 +280,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_EQ(16384u, sharedCaps.image2DMaxHeight);
EXPECT_EQ(2048u, sharedCaps.imageMaxArraySize);
if (device->getHardwareInfo().capabilityTable.supportsOcl21Features == false && is64bit) {
EXPECT_TRUE(sharedCaps.force32BitAddressess);
EXPECT_TRUE(sharedCaps.force32BitAddresses);
}
}
@ -398,9 +398,9 @@ TEST_F(DeviceGetCapsTest, givenForce32bitAddressingWhenCapsAreCreatedThenDeviceR
const auto &sharedCaps = device->getSharedDeviceInfo();
const auto memSizePercent = device->getMemoryManager()->getPercentOfGlobalMemoryAvailable(device->getRootDeviceIndex());
if constexpr (is64bit) {
EXPECT_TRUE(sharedCaps.force32BitAddressess);
EXPECT_TRUE(sharedCaps.force32BitAddresses);
} else {
EXPECT_FALSE(sharedCaps.force32BitAddressess);
EXPECT_FALSE(sharedCaps.force32BitAddresses);
}
auto expectedSize = (cl_ulong)(4 * memSizePercent * MemoryConstants::gigaByte);
EXPECT_LE(sharedCaps.globalMemSize, expectedSize);

View File

@ -107,10 +107,10 @@ TEST_F(DeviceTest, GivenDebugVariableForcing32BitAllocationsWhenDeviceIsCreatedT
debugManager.flags.Force32bitAddressing.set(true);
auto pDevice = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
if constexpr (is64bit) {
EXPECT_TRUE(pDevice->getDeviceInfo().force32BitAddressess);
EXPECT_TRUE(pDevice->getDeviceInfo().force32BitAddresses);
EXPECT_TRUE(pDevice->getMemoryManager()->peekForce32BitAllocations());
} else {
EXPECT_FALSE(pDevice->getDeviceInfo().force32BitAddressess);
EXPECT_FALSE(pDevice->getDeviceInfo().force32BitAddresses);
EXPECT_FALSE(pDevice->getMemoryManager()->peekForce32BitAllocations());
}
debugManager.flags.Force32bitAddressing.set(false);

View File

@ -1727,12 +1727,12 @@ TEST_F(ProgramTests, WhenCreatingProgramThenBindlessIsEnabledOnlyIfDebugFlagIsEn
}
}
TEST_F(ProgramTests, GivenForce32BitAddressessWhenProgramIsCreatedThenGreaterThan4gbBuffersRequiredIsCorrectlySet) {
TEST_F(ProgramTests, GivenForce32BitAddressesWhenProgramIsCreatedThenGreaterThan4gbBuffersRequiredIsCorrectlySet) {
DebugManagerStateRestore dbgRestorer;
cl_int retVal = CL_DEVICE_NOT_FOUND;
debugManager.flags.DisableStatelessToStatefulOptimization.set(false);
if (pDevice) {
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddressess = true;
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddresses = true;
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
auto internalOptions = program.getInternalOptions();
const auto &compilerProductHelper = pDevice->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();
@ -1774,10 +1774,10 @@ TEST_F(ProgramTests, givenProgramWhenItIsCompiledThenItAlwaysHavePreserveVec3Typ
EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::preserveVec3Type)) << internalOptions;
}
TEST_F(ProgramTests, Force32BitAddressessWhenProgramIsCreatedThenGreaterThan4gbBuffersRequiredIsCorrectlySet) {
TEST_F(ProgramTests, Force32BitAddressesWhenProgramIsCreatedThenGreaterThan4gbBuffersRequiredIsCorrectlySet) {
DebugManagerStateRestore dbgRestorer;
debugManager.flags.DisableStatelessToStatefulOptimization.set(false);
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddressess = true;
const_cast<DeviceInfo *>(&pDevice->getDeviceInfo())->force32BitAddresses = true;
std::unique_ptr<MockProgram> program{Program::createBuiltInFromSource<MockProgram>("", pContext, pContext->getDevices(), nullptr)};
auto internalOptions = program->getInternalOptions();
const auto &compilerProductHelper = pDevice->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();

View File

@ -260,7 +260,7 @@ bool Device::initDeviceFully() {
}
}
executionEnvironment->memoryManager->setForce32BitAllocations(getDeviceInfo().force32BitAddressess);
executionEnvironment->memoryManager->setForce32BitAllocations(getDeviceInfo().force32BitAddresses);
if (debugManager.flags.EnableSWTags.get() && !getRootDeviceEnvironment().tagsManager->isInitialized()) {
getRootDeviceEnvironment().tagsManager->initialize(*this);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -75,7 +75,7 @@ void Device::initializeCaps() {
double percentOfGlobalMemoryAvailable = getPercentOfGlobalMemoryAvailable();
deviceInfo.globalMemSize = std::min(deviceInfo.globalMemSize, static_cast<uint64_t>(4 * MemoryConstants::gigaByte * percentOfGlobalMemoryAvailable));
deviceInfo.addressBits = 32;
deviceInfo.force32BitAddressess = is64bit;
deviceInfo.force32BitAddresses = is64bit;
}
deviceInfo.globalMemSize = alignDown(deviceInfo.globalMemSize, MemoryConstants::pageSize);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -47,7 +47,7 @@ struct DeviceInfo {
StackVec<uint32_t, 6> threadsPerEUConfigs;
uint32_t vendorId;
uint32_t vmeAvcSupportsPreemption;
bool force32BitAddressess;
bool force32BitAddresses;
std::string name;
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -28,16 +28,16 @@ const bool enableBacktrace = true;
constexpr u_int32_t backtraceBufferSize = 256;
void collectBacktrace() {
void *addressess[backtraceBufferSize];
void *addresses[backtraceBufferSize];
char **functions;
auto pointersCount = backtrace(addressess, backtraceBufferSize);
functions = backtrace_symbols(addressess, pointersCount);
auto pointersCount = backtrace(addresses, backtraceBufferSize);
functions = backtrace_symbols(addresses, pointersCount);
printf("\n backtrace collected -- START --\n");
for (int symbolId = 0; symbolId < pointersCount; symbolId++) {
Dl_info info;
dladdr(addressess[symbolId], &info);
dladdr(addresses[symbolId], &info);
char *realname;
int status;
realname = abi::__cxa_demangle(info.dli_sname, 0, 0, &status);