refactor: correct naming of enum class constants 4/n

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-12-12 11:37:31 +00:00
committed by Compute-Runtime-Automation
parent 01dd503e47
commit 432142c574
86 changed files with 314 additions and 314 deletions

View File

@@ -397,7 +397,7 @@ struct CommandList : _ze_command_list_handle_t {
ze_command_list_flags_t flags = 0u;
NEO::PreemptionMode commandListPreemptionMode = NEO::PreemptionMode::Initial;
NEO::EngineGroupType engineGroupType = NEO::EngineGroupType::maxEngineGroups;
NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::PrivateHeaps;
NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::privateHeaps;
uint32_t cmdListType = CommandListType::TYPE_REGULAR;
uint32_t commandListPerThreadScratchSize = 0u;

View File

@@ -61,7 +61,7 @@ namespace L0 {
inline ze_result_t parseErrorCode(NEO::CommandContainer::ErrorCode returnValue) {
switch (returnValue) {
case NEO::CommandContainer::ErrorCode::OUT_OF_DEVICE_MEMORY:
case NEO::CommandContainer::ErrorCode::outOfDeviceMemory:
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
default:
return ZE_RESULT_SUCCESS;
@@ -2962,7 +2962,7 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamPropertiesForRegularComma
bool checkDsh = false;
bool checkIoh = false;
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::PrivateHeaps) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) {
if (currentSurfaceStateBaseAddress == NEO::StreamProperty64::initValue || commandContainer.isHeapDirty(NEO::IndirectHeap::Type::SURFACE_STATE)) {
auto ssh = commandContainer.getIndirectHeap(NEO::IndirectHeap::Type::SURFACE_STATE);
if (ssh) {

View File

@@ -129,7 +129,7 @@ NEO::CompletionStamp CommandListCoreFamilyImmediate<gfxCoreFamily>::flushImmedia
this->requiredStreamState.stateBaseAddress.setPropertiesIndirectState(ioh->getHeapGpuBase(), ioh->getHeapSizeInPages());
}
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
ssh = this->csr->getGlobalStatelessHeap();
this->csr->makeResident(*ssh->getGraphicsAllocation());
if (this->requiredStreamState.stateBaseAddress.surfaceStateBaseAddress.value == NEO::StreamProperty64::initValue) {
@@ -261,7 +261,7 @@ NEO::CompletionStamp CommandListCoreFamilyImmediate<gfxCoreFamily>::flushRegular
this->updateDispatchFlagsWithRequiredStreamState(dispatchFlags);
this->csr->setRequiredScratchSizes(this->getCommandListPerThreadScratchSize(), this->getCommandListPerThreadPrivateScratchSize());
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
ssh = this->csr->getGlobalStatelessHeap();
} else if (this->immediateCmdListHeapSharing) {
auto &sshReserveConfig = this->commandContainer.getSurfaceStateHeapReserve();

View File

@@ -99,7 +99,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
if (NEO::AddressingModeHelper::containsStatefulAccess(kernelDescriptor, false)) {
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
@@ -126,12 +126,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
commandListPerThreadScratchSize = std::max<uint32_t>(commandListPerThreadScratchSize, kernelDescriptor.kernelAttributes.perThreadScratchSize[0]);
commandListPerThreadPrivateScratchSize = std::max<uint32_t>(commandListPerThreadPrivateScratchSize, kernelDescriptor.kernelAttributes.perThreadScratchSize[1]);
if ((this->cmdListHeapAddressModel == NEO::HeapAddressModel::PrivateHeaps) && (commandListPerThreadScratchSize != 0 || commandListPerThreadPrivateScratchSize != 0)) {
if ((this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) && (commandListPerThreadScratchSize != 0 || commandListPerThreadPrivateScratchSize != 0)) {
commandContainer.prepareBindfulSsh();
}
if ((this->immediateCmdListHeapSharing || this->stateBaseAddressTracking) &&
(this->cmdListHeapAddressModel == NEO::HeapAddressModel::PrivateHeaps)) {
(this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps)) {
auto &sshReserveConfig = commandContainer.getSurfaceStateHeapReserve();
NEO::HeapReserveArguments sshReserveArgs = {sshReserveConfig.indirectHeapReservation,

View File

@@ -55,7 +55,7 @@ ze_result_t CommandListImp::destroy() {
if (this->cmdListType == CommandListType::TYPE_REGULAR &&
!isCopyOnly() &&
this->stateBaseAddressTracking &&
this->cmdListHeapAddressModel == NEO::HeapAddressModel::PrivateHeaps) {
this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) {
auto surfaceStateHeap = this->commandContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE);
if (surfaceStateHeap) {

View File

@@ -250,7 +250,7 @@ CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::
csr->initializeResources();
csr->initDirectSubmission();
if (commandQueue->cmdListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (commandQueue->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
csr->createGlobalStatelessHeap();
}

View File

@@ -74,7 +74,7 @@ struct CommandQueue : _ze_command_queue_handle_t {
uint32_t partitionCount = 1;
uint32_t activeSubDevices = 1;
std::atomic<TaskCountType> taskCount = 0;
NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::PrivateHeaps;
NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::privateHeaps;
bool preemptionCmdSyncProgramming = true;
bool commandQueueDebugCmdsProgrammed = false;

View File

@@ -546,7 +546,7 @@ void CommandQueueHw<gfxCoreFamily>::setupCmdListsAndContextParams(
ctx.perThreadScratchSpaceSize = std::max(ctx.perThreadScratchSpaceSize, commandList->getCommandListPerThreadScratchSize());
ctx.perThreadPrivateScratchSize = std::max(ctx.perThreadPrivateScratchSize, commandList->getCommandListPerThreadPrivateScratchSize());
if (commandList->getCmdListHeapAddressModel() == NEO::HeapAddressModel::PrivateHeaps) {
if (commandList->getCmdListHeapAddressModel() == NEO::HeapAddressModel::privateHeaps) {
if (commandList->getCommandListPerThreadScratchSize() != 0 || commandList->getCommandListPerThreadPrivateScratchSize() != 0) {
if (commandContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE) != nullptr) {
heapContainer.push_back(commandContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE)->getGraphicsAllocation());
@@ -1384,7 +1384,7 @@ void CommandQueueHw<gfxCoreFamily>::updateBaseAddressState(CommandList *lastComm
auto &commandContainer = lastCommandList->getCmdContainer();
if (lastCommandList->getCmdListHeapAddressModel() == NEO::HeapAddressModel::GlobalStateless) {
if (lastCommandList->getCmdListHeapAddressModel() == NEO::HeapAddressModel::globalStateless) {
auto globalStateless = csr->getGlobalStatelessHeap();
csrHw->getSshState().updateAndCheck(globalStateless);
streamProperties.stateBaseAddress.setPropertiesSurfaceState(globalStateless->getHeapGpuBase(), globalStateless->getHeapSizeInPages());
@@ -1421,7 +1421,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateStateBaseAddressCmdSizeForMultiple
size_t estimatedSize = 0;
if (commandListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (commandListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
estimatedSize = estimateStateBaseAddressCmdSizeForGlobalStatelessCommandList(baseAddressStateDirty, csrState, cmdListRequired, cmdListFinal, requiredState, propertyDirty);
} else {
estimatedSize = estimateStateBaseAddressCmdSizeForPrivateHeapCommandList(baseAddressStateDirty, csrState, cmdListRequired, cmdListFinal, requiredState, propertyDirty);

View File

@@ -139,7 +139,7 @@ void CommandQueueHw<gfxCoreFamily>::handleScratchSpace(NEO::HeapContainer &sshHe
bool &gsbaState, bool &frontEndState,
uint32_t perThreadScratchSpaceSize, uint32_t perThreadPrivateScratchSize) {
if (perThreadScratchSpaceSize > 0 || perThreadPrivateScratchSize > 0) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::GlobalStateless) {
if (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) {
auto globalStatelessHeapAllocation = csr->getGlobalStatelessHeapAllocation();
scratchController->setRequiredScratchSpace(globalStatelessHeapAllocation->getUnderlyingBuffer(), 0, perThreadScratchSpaceSize, perThreadPrivateScratchSize, csr->peekTaskCount(),
csr->getOsContext(), gsbaState, frontEndState);

View File

@@ -1241,7 +1241,7 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
bool ret = NEO::SipKernel::initSipKernel(NEO::SipKernel::getSipKernelType(*neoDevice), *neoDevice);
UNRECOVERABLE_IF(!ret);
if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == NEO::DebuggingMode::Offline) {
if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == NEO::DebuggingMode::offline) {
if (NEO::SipKernel::getSipKernel(*neoDevice, nullptr).getCtxOffset() == 0) {
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
"Invalid SIP binary.\n");

View File

@@ -194,7 +194,7 @@ void DriverHandleImp::updateRootDeviceBitFields(std::unique_ptr<NEO::Device> &ne
}
void DriverHandleImp::enableRootDeviceDebugger(std::unique_ptr<NEO::Device> &neoDevice) {
if (enableProgramDebugging != NEO::DebuggingMode::Disabled) {
if (enableProgramDebugging != NEO::DebuggingMode::disabled) {
const auto rootDeviceIndex = neoDevice->getRootDeviceIndex();
auto rootDeviceEnvironment = neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex].get();
rootDeviceEnvironment->initDebuggerL0(neoDevice.get());
@@ -230,7 +230,7 @@ ze_result_t DriverHandleImp::initialize(std::vector<std::unique_ptr<NEO::Device>
this->devices.push_back(device);
auto osInterface = device->getNEODevice()->getRootDeviceEnvironment().osInterface.get();
if (osInterface && !osInterface->isDebugAttachAvailable() && enableProgramDebugging != NEO::DebuggingMode::Disabled) {
if (osInterface && !osInterface->isDebugAttachAvailable() && enableProgramDebugging != NEO::DebuggingMode::disabled) {
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
"Debug mode is not enabled in the system.\n");
return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE;

View File

@@ -160,7 +160,7 @@ struct DriverHandleImp : public DriverHandle {
void enableRootDeviceDebugger(std::unique_ptr<NEO::Device> &neoDevice);
// Environment Variables
NEO::DebuggingMode enableProgramDebugging = NEO::DebuggingMode::Disabled;
NEO::DebuggingMode enableProgramDebugging = NEO::DebuggingMode::disabled;
bool enableSysman = false;
bool enablePciIdDeviceOrder = false;
uint8_t powerHint = 0;

View File

@@ -56,7 +56,7 @@ bool L0GfxCoreHelperHw<Family>::isZebinAllowed(const NEO::Debugger *debugger) co
template <typename Family>
NEO::HeapAddressModel L0GfxCoreHelperHw<Family>::getPlatformHeapAddressModel() const {
return NEO::HeapAddressModel::PrivateHeaps;
return NEO::HeapAddressModel::privateHeaps;
}
template <typename Family>

View File

@@ -69,7 +69,7 @@ bool L0GfxCoreHelperHw<Family>::isZebinAllowed(const NEO::Debugger *debugger) co
template <typename Family>
NEO::HeapAddressModel L0GfxCoreHelperHw<Family>::getPlatformHeapAddressModel() const {
return NEO::HeapAddressModel::PrivateHeaps;
return NEO::HeapAddressModel::privateHeaps;
}
template <typename Family>

View File

@@ -945,10 +945,10 @@ ze_result_t KernelImp::initialize(const ze_kernel_desc_t *desc) {
const auto &productHelper = neoDevice->getProductHelper();
auto &kernelDescriptor = kernelImmData->getDescriptor();
auto ret = NEO::KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(kernelDescriptor.kernelAttributes, neoDevice);
if (ret == NEO::KernelHelper::ErrorCode::INVALID_KERNEL) {
if (ret == NEO::KernelHelper::ErrorCode::invalidKernel) {
return ZE_RESULT_ERROR_INVALID_NATIVE_BINARY;
}
if (ret == NEO::KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY) {
if (ret == NEO::KernelHelper::ErrorCode::outOfDeviceMemory) {
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
}
UNRECOVERABLE_IF(!this->kernelImmData->getKernelInfo()->heapInfo.pKernelHeap);