From 432142c57444c0ea3e3ac4ce3d3ac26c609b21ca Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Tue, 12 Dec 2023 11:37:31 +0000 Subject: [PATCH] refactor: correct naming of enum class constants 4/n Signed-off-by: Mateusz Jablonski --- level_zero/core/source/cmdlist/cmdlist.h | 2 +- level_zero/core/source/cmdlist/cmdlist_hw.inl | 4 +- .../source/cmdlist/cmdlist_hw_immediate.inl | 4 +- .../cmdlist/cmdlist_hw_xehp_and_later.inl | 6 +- .../core/source/cmdlist/cmdlist_imp.cpp | 2 +- level_zero/core/source/cmdqueue/cmdqueue.cpp | 2 +- level_zero/core/source/cmdqueue/cmdqueue.h | 2 +- .../core/source/cmdqueue/cmdqueue_hw.inl | 6 +- .../cmdqueue_xe_hp_core_and_later.inl | 2 +- level_zero/core/source/device/device_imp.cpp | 2 +- .../core/source/driver/driver_handle_imp.cpp | 4 +- .../core/source/driver/driver_handle_imp.h | 2 +- .../l0_gfx_core_helper_skl_to_tgllp.inl | 2 +- .../l0_gfx_core_helper_xehp_and_later.inl | 2 +- level_zero/core/source/kernel/kernel_imp.cpp | 4 +- .../test/aub_tests/fixtures/aub_fixture.cpp | 4 +- .../unit_tests/fixtures/cmdlist_fixture.cpp | 16 ++--- .../gen11/test_l0_gfx_core_helper_gen11.cpp | 2 +- .../test_l0_gfx_core_helper_gen12lp.cpp | 2 +- .../gen9/test_l0_gfx_core_helper_gen9.cpp | 2 +- .../sources/cmdlist/test_cmdlist_6.cpp | 8 +-- .../sources/debugger/l0_debugger_fixture.h | 4 +- .../debugger/linux/test_l0_debugger_linux.cpp | 26 +++---- .../sources/debugger/test_l0_debugger_1.cpp | 8 +-- .../debugger/test_module_with_debug.cpp | 2 +- .../windows/test_l0_debugger_windows.cpp | 14 ++-- .../sources/device/test_l0_device.cpp | 2 +- .../unit_tests/sources/driver/test_driver.cpp | 6 +- .../helper/l0_gfx_core_helper_tests.cpp | 8 +-- .../test_l0_gfx_core_helper_xe_hpc_core.cpp | 2 +- .../test_l0_gfx_core_helper_xe_hpg_core.cpp | 2 +- opencl/source/command_queue/enqueue_common.h | 10 +-- opencl/source/helpers/properties_helper.cpp | 6 +- opencl/source/helpers/task_information.cpp | 4 +- opencl/source/kernel/kernel.cpp | 4 +- .../debugger/ocl_with_l0_debugger_tests.cpp | 2 +- .../helpers/timestamp_packet_1_tests.cpp | 22 +++--- .../test/unit_test/linux/main_linux_dll.cpp | 4 +- .../unit_test/platform/platform_tests.cpp | 2 +- shared/source/built_ins/built_ins.cpp | 2 +- shared/source/built_ins/sip_init.cpp | 2 +- .../source/command_container/cmdcontainer.cpp | 10 +-- .../source/command_container/cmdcontainer.h | 6 +- shared/source/command_stream/csr_deps.h | 6 +- shared/source/debugger/debugger.h | 14 ++-- .../debugger/linux/debugger_l0_linux.cpp | 6 +- shared/source/dll/linux/drm_neo_create.cpp | 2 +- .../execution_environment.h | 4 +- .../source/helpers/heap_base_address_model.h | 8 +-- shared/source/helpers/kernel_helpers.cpp | 6 +- shared/source/helpers/kernel_helpers.h | 6 +- .../memory_manager/allocation_properties.h | 2 +- .../source/memory_manager/allocation_type.h | 6 +- .../source/memory_manager/host_ptr_defines.h | 14 ++-- .../memory_manager/host_ptr_manager.cpp | 14 ++-- .../source/memory_manager/memory_manager.cpp | 2 +- .../os_interface/linux/ioctl_helper.cpp | 2 +- .../windows/max_chunk_size_drm_or_wddm.cpp | 6 +- .../windows/max_chunk_size_wddm.cpp | 2 +- .../windows/wddm_memory_manager.cpp | 24 +++---- .../release_helper_common_xe_lpg.inl | 2 +- shared/test/common/helpers/sip_init.cpp | 2 +- shared/test/common/libult/linux/drm_mock.cpp | 2 +- .../os_interface/linux/drm_neo_create.cpp | 2 +- shared/test/unit_test/built_ins/sip_tests.cpp | 8 +-- .../command_container_tests.cpp | 36 +++++----- .../command_stream_receiver_tests.cpp | 2 +- .../debugger/linux/test_l0_debugger_linux.cpp | 4 +- .../unit_test/debugger/test_l0_debugger.cpp | 16 ++--- .../gen12lp/test_command_encoder_gen12lp.cpp | 4 +- .../helpers/kernel_helpers_tests.cpp | 20 +++--- .../memory_manager/host_ptr_manager_tests.cpp | 68 +++++++++---------- .../memory_manager/memory_manager_tests.cpp | 2 +- .../linux/drm_buffer_object_tests.cpp | 20 +++--- .../linux/drm_debug_prelim_tests.cpp | 8 +-- ...m_memory_manager_localmem_prelim_tests.cpp | 2 +- .../linux/drm_memory_manager_tests.cpp | 2 +- .../linux/drm_query_prelim_tests.cpp | 4 +- .../os_interface/linux/drm_tests.cpp | 16 ++--- .../linux/drm_with_prelim_tests.cpp | 8 +-- .../windows/wddm_memory_manager_tests.cpp | 38 +++++------ .../windows/wddm_special_heap_test.cpp | 2 +- .../os_interface/windows/wddm_tests.cpp | 2 +- .../test_preemption_xehp_and_later.cpp | 2 +- .../release_helper_tests_base.cpp | 2 +- .../windows/wddm_memory_manager_tests_dg2.cpp | 2 +- 86 files changed, 314 insertions(+), 314 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist.h b/level_zero/core/source/cmdlist/cmdlist.h index 7021c717ae..f3133ea290 100644 --- a/level_zero/core/source/cmdlist/cmdlist.h +++ b/level_zero/core/source/cmdlist/cmdlist.h @@ -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; diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 77597b6fe9..f7d13497e3 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -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::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) { diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl index 6144b5b099..f447c83eaa 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl @@ -129,7 +129,7 @@ NEO::CompletionStamp CommandListCoreFamilyImmediate::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::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(); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl index b61f8220b9..8ca315c943 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl @@ -99,7 +99,7 @@ ze_result_t CommandListCoreFamily::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::appendLaunchKernelWithParams(K commandListPerThreadScratchSize = std::max(commandListPerThreadScratchSize, kernelDescriptor.kernelAttributes.perThreadScratchSize[0]); commandListPerThreadPrivateScratchSize = std::max(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, diff --git a/level_zero/core/source/cmdlist/cmdlist_imp.cpp b/level_zero/core/source/cmdlist/cmdlist_imp.cpp index a7066c8963..17aeaad550 100644 --- a/level_zero/core/source/cmdlist/cmdlist_imp.cpp +++ b/level_zero/core/source/cmdlist/cmdlist_imp.cpp @@ -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) { diff --git a/level_zero/core/source/cmdqueue/cmdqueue.cpp b/level_zero/core/source/cmdqueue/cmdqueue.cpp index c7b9e9004a..d8af712bc4 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue.cpp +++ b/level_zero/core/source/cmdqueue/cmdqueue.cpp @@ -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(); } diff --git a/level_zero/core/source/cmdqueue/cmdqueue.h b/level_zero/core/source/cmdqueue/cmdqueue.h index a0e7d29aba..ae516c4056 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue.h +++ b/level_zero/core/source/cmdqueue/cmdqueue.h @@ -74,7 +74,7 @@ struct CommandQueue : _ze_command_queue_handle_t { uint32_t partitionCount = 1; uint32_t activeSubDevices = 1; std::atomic taskCount = 0; - NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::PrivateHeaps; + NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::privateHeaps; bool preemptionCmdSyncProgramming = true; bool commandQueueDebugCmdsProgrammed = false; diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index de699d5e3f..f8572ad5ec 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -546,7 +546,7 @@ void CommandQueueHw::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::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::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); diff --git a/level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl b/level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl index 2abc4637da..e85ee12ad4 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl @@ -139,7 +139,7 @@ void CommandQueueHw::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); diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index 1516e5d1ce..73c41deaa4 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -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"); diff --git a/level_zero/core/source/driver/driver_handle_imp.cpp b/level_zero/core/source/driver/driver_handle_imp.cpp index dd23f3b521..8f772376db 100644 --- a/level_zero/core/source/driver/driver_handle_imp.cpp +++ b/level_zero/core/source/driver/driver_handle_imp.cpp @@ -194,7 +194,7 @@ void DriverHandleImp::updateRootDeviceBitFields(std::unique_ptr &ne } void DriverHandleImp::enableRootDeviceDebugger(std::unique_ptr &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 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; diff --git a/level_zero/core/source/driver/driver_handle_imp.h b/level_zero/core/source/driver/driver_handle_imp.h index 7a9d389d91..b16d3364f4 100644 --- a/level_zero/core/source/driver/driver_handle_imp.h +++ b/level_zero/core/source/driver/driver_handle_imp.h @@ -160,7 +160,7 @@ struct DriverHandleImp : public DriverHandle { void enableRootDeviceDebugger(std::unique_ptr &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; diff --git a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl index 61c9b0c68f..571f6c375f 100644 --- a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl +++ b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl @@ -56,7 +56,7 @@ bool L0GfxCoreHelperHw::isZebinAllowed(const NEO::Debugger *debugger) co template NEO::HeapAddressModel L0GfxCoreHelperHw::getPlatformHeapAddressModel() const { - return NEO::HeapAddressModel::PrivateHeaps; + return NEO::HeapAddressModel::privateHeaps; } template diff --git a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_xehp_and_later.inl b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_xehp_and_later.inl index 83e5110c58..c3ca24a959 100644 --- a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_xehp_and_later.inl +++ b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_xehp_and_later.inl @@ -69,7 +69,7 @@ bool L0GfxCoreHelperHw::isZebinAllowed(const NEO::Debugger *debugger) co template NEO::HeapAddressModel L0GfxCoreHelperHw::getPlatformHeapAddressModel() const { - return NEO::HeapAddressModel::PrivateHeaps; + return NEO::HeapAddressModel::privateHeaps; } template diff --git a/level_zero/core/source/kernel/kernel_imp.cpp b/level_zero/core/source/kernel/kernel_imp.cpp index 41b39e27f9..a00cc1a2b8 100644 --- a/level_zero/core/source/kernel/kernel_imp.cpp +++ b/level_zero/core/source/kernel/kernel_imp.cpp @@ -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); diff --git a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp index d0e0bd2799..5ae38b4cfd 100644 --- a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp +++ b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp @@ -41,7 +41,7 @@ void AUBFixtureL0::setUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn executionEnvironment->rootDeviceEnvironments[0]->initGmm(); if (debuggingEnabled) { - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); } auto &gfxCoreHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); @@ -64,7 +64,7 @@ void AUBFixtureL0::setUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn devices.push_back(std::unique_ptr(neoDevice)); driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = debuggingEnabled ? NEO::DebuggingMode::Online : NEO::DebuggingMode::Disabled; + driverHandle->enableProgramDebugging = debuggingEnabled ? NEO::DebuggingMode::online : NEO::DebuggingMode::disabled; driverHandle->initialize(std::move(devices)); diff --git a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp index 42b6c16ed2..a730bee453 100644 --- a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp +++ b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp @@ -188,7 +188,7 @@ void CommandListStateBaseAddressFixture::setUp() { void CommandListPrivateHeapsFixture::setUp() { constexpr uint32_t storeAllocations = 4; - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); debugManager.flags.SetAmountOfReusableAllocations.set(storeAllocations); CommandListStateBaseAddressFixture::setUp(); @@ -214,7 +214,7 @@ void CommandListPrivateHeapsFixture::setUp() { } void CommandListGlobalHeapsFixtureInit::setUp() { - CommandListGlobalHeapsFixtureInit::setUpParams(static_cast(NEO::HeapAddressModel::GlobalStateless)); + CommandListGlobalHeapsFixtureInit::setUpParams(static_cast(NEO::HeapAddressModel::globalStateless)); } void CommandListGlobalHeapsFixtureInit::setUpParams(int32_t globalHeapMode) { @@ -222,7 +222,7 @@ void CommandListGlobalHeapsFixtureInit::setUpParams(int32_t globalHeapMode) { debugManager.flags.UseImmediateFlushTask.set(0); CommandListStateBaseAddressFixture::setUp(); - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); ze_result_t returnValue; commandListPrivateHeap.reset(CommandList::whiteboxCast(CommandList::create(productFamily, device, engineGroupType, 0u, returnValue))); @@ -240,7 +240,7 @@ void ImmediateCmdListSharedHeapsFixture::setUp() { debugManager.flags.EnableFlushTaskSubmission.set(1); debugManager.flags.EnableImmediateCmdListHeapSharing.set(1); - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); debugManager.flags.SetAmountOfReusableAllocations.set(storeAllocations); ModuleMutableCommandListFixture::setUp(); @@ -475,7 +475,7 @@ void PrimaryBatchBufferCmdListFixture::setUp() { } void PrimaryBatchBufferPreamblelessCmdListFixture::setUp() { - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::GlobalStateless)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::globalStateless)); debugManager.flags.ForceL1Caching.set(0); debugManager.flags.EnableStateBaseAddressTracking.set(1); @@ -501,14 +501,14 @@ void ImmediateFlushTaskCmdListFixture::setUp() { } void ImmediateFlushTaskGlobalStatelessCmdListFixture::setUp() { - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::GlobalStateless)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::globalStateless)); ImmediateFlushTaskCmdListFixture::setUp(); } void ImmediateFlushTaskCsrSharedHeapCmdListFixture::setUp() { debugManager.flags.EnableImmediateCmdListHeapSharing.set(1); - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); debugManager.flags.ForceDefaultHeapSize.set(64); ImmediateFlushTaskCmdListFixture::setUp(); @@ -528,7 +528,7 @@ void ImmediateFlushTaskCsrSharedHeapCmdListFixture::setUp() { void ImmediateFlushTaskPrivateHeapCmdListFixture::setUp() { debugManager.flags.EnableImmediateCmdListHeapSharing.set(0); - debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); ImmediateFlushTaskCmdListFixture::setUp(); } diff --git a/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp b/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp index c0f68b0bae..4cb3a8ebf5 100644 --- a/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp +++ b/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp @@ -48,7 +48,7 @@ GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForRayTracin GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); } GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { diff --git a/level_zero/core/test/unit_tests/gen12lp/test_l0_gfx_core_helper_gen12lp.cpp b/level_zero/core/test/unit_tests/gen12lp/test_l0_gfx_core_helper_gen12lp.cpp index 536770cf1c..6df6ca750d 100644 --- a/level_zero/core/test/unit_tests/gen12lp/test_l0_gfx_core_helper_gen12lp.cpp +++ b/level_zero/core/test/unit_tests/gen12lp/test_l0_gfx_core_helper_gen12lp.cpp @@ -65,7 +65,7 @@ GEN12LPTEST_F(L0GfxCoreHelperTestGen12Lp, GivenGen12LpWhenCheckingL0HelperForRay GEN12LPTEST_F(L0GfxCoreHelperTestGen12Lp, GivenGen12LpWhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); } GEN12LPTEST_F(L0GfxCoreHelperTestGen12Lp, GivenGen12LpWhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { diff --git a/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp index 007099e465..3fb2f729c9 100644 --- a/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp +++ b/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp @@ -48,7 +48,7 @@ GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForRayTracingSu GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); } GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp index 965b746b28..5571907c05 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp @@ -1305,11 +1305,11 @@ HWTEST2_F(ImmediateCmdListSharedHeapsTest, givenMultipleCommandListsUsingSharedH EXPECT_GE(expectedSshAlignedSize, sshUsed); } -using CommandListStateBaseAddressGlobalStatelessTest = Test(NEO::HeapAddressModel::GlobalStateless)>>; +using CommandListStateBaseAddressGlobalStatelessTest = Test(NEO::HeapAddressModel::globalStateless)>>; HWTEST2_F(CommandListStateBaseAddressGlobalStatelessTest, givenGlobalStatelessWhenExecutingCommandListThenMakeAllocationResident, IsAtLeastXeHpCore) { - EXPECT_EQ(NEO::HeapAddressModel::GlobalStateless, commandList->cmdListHeapAddressModel); - EXPECT_EQ(NEO::HeapAddressModel::GlobalStateless, commandListImmediate->cmdListHeapAddressModel); - EXPECT_EQ(NEO::HeapAddressModel::GlobalStateless, commandQueue->cmdListHeapAddressModel); + EXPECT_EQ(NEO::HeapAddressModel::globalStateless, commandList->cmdListHeapAddressModel); + EXPECT_EQ(NEO::HeapAddressModel::globalStateless, commandListImmediate->cmdListHeapAddressModel); + EXPECT_EQ(NEO::HeapAddressModel::globalStateless, commandQueue->cmdListHeapAddressModel); ASSERT_EQ(commandListImmediate->csr, commandQueue->getCsr()); auto globalStatelessAlloc = commandListImmediate->csr->getGlobalStatelessHeapAllocation(); diff --git a/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h b/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h index 4ce5f3c5e8..19070f0e33 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h +++ b/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h @@ -34,7 +34,7 @@ struct L0DebuggerFixture { executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); memoryOperationsHandler = new NEO::MockMemoryOperations(); executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface.reset(memoryOperationsHandler); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(); @@ -55,7 +55,7 @@ struct L0DebuggerFixture { NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); device = driverHandle->devices[0]; diff --git a/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp b/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp index be520501cb..4f136fab07 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp @@ -36,7 +36,7 @@ struct L0DebuggerLinuxFixture { auto executionEnvironment = new NEO::ExecutionEnvironment(); auto mockBuiltIns = new NEO::MockBuiltins(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo ? hwInfo : defaultHwInfo.get()); executionEnvironment->initializeMemoryManager(); @@ -50,7 +50,7 @@ struct L0DebuggerLinuxFixture { NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); device = driverHandle->devices[0]; @@ -119,7 +119,7 @@ TEST_F(L0DebuggerLinuxTest, givenLinuxOSWhenL0DebuggerIsCreatedAddressModeIsNotS TEST(L0DebuggerLinux, givenVmBindAndPerContextVmEnabledInDrmWhenInitializingDebuggingInOsThenRegisterResourceClassesIsCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); auto drmMock = new DrmMockResources(*executionEnvironment->rootDeviceEnvironments[0]); @@ -138,7 +138,7 @@ TEST(L0DebuggerLinux, givenVmBindAndPerContextVmEnabledInDrmWhenInitializingDebu TEST(L0DebuggerLinux, givenVmBindAndOfflineDebuggingModeWhenInitializingDebuggingInOsThenRegisterResourceClassesIsCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::offline); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); auto drmMock = new DrmMockResources(*executionEnvironment->rootDeviceEnvironments[0]); @@ -157,7 +157,7 @@ TEST(L0DebuggerLinux, givenVmBindAndOfflineDebuggingModeWhenInitializingDebuggin TEST(L0DebuggerLinux, givenVmBindNotAvailableInDrmWhenInitializingDebuggingInOsThenRegisterResourceClassesIsNotCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); auto drmMock = new DrmMockResources(*executionEnvironment->rootDeviceEnvironments[0]); @@ -179,7 +179,7 @@ TEST(L0DebuggerLinux, givenPrintDebugSettingsAndIncorrectSetupWhenInitializingDe auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); auto drmMock = new DrmMockResources(*executionEnvironment->rootDeviceEnvironments[0]); @@ -210,7 +210,7 @@ TEST(L0DebuggerLinux, givenPrintDebugSettingsAndIncorrectSetupWhenInitializingDe TEST(L0DebuggerLinux, givenPerContextVmNotEnabledWhenInitializingDebuggingInOsThenRegisterResourceClassesIsNotCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); auto drmMock = new DrmMockResources(*executionEnvironment->rootDeviceEnvironments[0]); @@ -393,7 +393,7 @@ HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledWhenCommandQueuesAreCreatedAn HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledAndDebugAttachAvailableWhenInitializingDriverThenSuccessIsReturned) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); @@ -406,7 +406,7 @@ HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledAndDebugAttachAvailableWhenIn NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; drmMock->allowDebugAttach = true; @@ -417,7 +417,7 @@ HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledAndDebugAttachAvailableWhenIn HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledAndDebugAttachNotAvailableWhenInitializingDriverThenErrorIsReturned) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); @@ -430,7 +430,7 @@ HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledAndDebugAttachNotAvailableWhe NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; drmMock->allowDebugAttach = false; @@ -543,7 +543,7 @@ HWTEST_F(L0DebuggerLinuxMultitileTest, givenSubDeviceFilteredByAffinityMaskWhenC executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->parseAffinityMask(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); executionEnvironment->initializeMemoryManager(); @@ -557,7 +557,7 @@ HWTEST_F(L0DebuggerLinuxMultitileTest, givenSubDeviceFilteredByAffinityMaskWhenC NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); auto device = driverHandle->devices[0]; diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp index 08ac33f157..768ada3bfb 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp @@ -68,12 +68,12 @@ TEST_F(L0DebuggerTest, givenL0DebuggerWhenGettingStateSaveAreaHeaderThenValidSip } TEST_F(L0DebuggerTest, givenProgramDebuggingEnabledWhenDebuggerIsCreatedThenFusedEusAreDisabled) { - EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::Online); + EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::online); EXPECT_FALSE(neoDevice->getHardwareInfo().capabilityTable.fusedEuEnabled); } TEST_F(L0DebuggerTest, givenProgramDebuggingEnabledWhenDebuggerIsCreatedThenCompressionIsDisabled) { - EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::Online); + EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::online); EXPECT_FALSE(neoDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers); EXPECT_FALSE(neoDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedImages); } @@ -699,7 +699,7 @@ HWTEST2_F(L0DebuggerTest, givenImmediateFlushTaskWhenAppendingKernelUsingNewHeap DebugManagerStateRestore restorer; NEO::debugManager.flags.EnableFlushTaskSubmission.set(true); NEO::debugManager.flags.UseImmediateFlushTask.set(1); - NEO::debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::PrivateHeaps)); + NEO::debugManager.flags.SelectCmdListHeapAddressModel.set(static_cast(NEO::HeapAddressModel::privateHeaps)); ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue = ZE_RESULT_SUCCESS; @@ -758,7 +758,7 @@ struct DebuggerWithGlobalBindlessFixture : public L0DebuggerFixture { NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); device = driverHandle->devices[0]; diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp index c0c7a09db5..e1b7352326 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp @@ -78,7 +78,7 @@ HWTEST_F(ModuleWithDebuggerL0MultiTileTest, GivenSubDeviceWhenCreatingModuleThen auto cip = new NEO::MockCompilerInterfaceCaptureBuildOptions(); neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->compilerInterface.reset(cip); - neoDevice->getExecutionEnvironment()->setDebuggingMode(NEO::DebuggingMode::Online); + neoDevice->getExecutionEnvironment()->setDebuggingMode(NEO::DebuggingMode::online); neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->initDebuggerL0(neoDevice); auto memoryOperationsHandler = new NEO::MockMemoryOperations(); neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->memoryOperationsInterface.reset(memoryOperationsHandler); diff --git a/level_zero/core/test/unit_tests/sources/debugger/windows/test_l0_debugger_windows.cpp b/level_zero/core/test/unit_tests/sources/debugger/windows/test_l0_debugger_windows.cpp index 5a69a9073c..82b1870d15 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/windows/test_l0_debugger_windows.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/windows/test_l0_debugger_windows.cpp @@ -33,10 +33,10 @@ namespace ult { struct L0DebuggerWindowsFixture { void setUp() { - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); executionEnvironment = new NEO::ExecutionEnvironment; executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get(); auto osEnvironment = new OsEnvironmentWin(); gdi = new MockGdi(); @@ -57,7 +57,7 @@ struct L0DebuggerWindowsFixture { NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); device = driverHandle->devices[0]; @@ -198,7 +198,7 @@ TEST_F(L0DebuggerWindowsTest, givenDebuggerL0NotifyModuleDestroyCalledAndModuleD TEST_F(L0DebuggerWindowsTest, givenProgramDebuggingEnabledAndDebugAttachAvailableWhenInitializingDriverThenSuccessIsReturned) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto hwInfo = *NEO::defaultHwInfo.get(); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); @@ -218,7 +218,7 @@ TEST_F(L0DebuggerWindowsTest, givenProgramDebuggingEnabledAndDebugAttachAvailabl devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; wddm->debugAttachAvailable = true; ze_result_t result = driverHandle->initialize(std::move(devices)); @@ -228,7 +228,7 @@ TEST_F(L0DebuggerWindowsTest, givenProgramDebuggingEnabledAndDebugAttachAvailabl TEST_F(L0DebuggerWindowsTest, givenProgramDebuggingEnabledAndDebugAttachNotAvailableWhenInitializingDriverThenErrorIsReturned) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto hwInfo = *NEO::defaultHwInfo.get(); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); @@ -248,7 +248,7 @@ TEST_F(L0DebuggerWindowsTest, givenProgramDebuggingEnabledAndDebugAttachNotAvail devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; wddm->debugAttachAvailable = false; ze_result_t result = driverHandle->initialize(std::move(devices)); diff --git a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp index ac209ebf3a..4b31ec51ba 100644 --- a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp +++ b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp @@ -212,7 +212,7 @@ TEST(L0DeviceTest, givenDebuggerEnabledButIGCNotReturnsSSAHThenSSAHIsNotCopied) NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); auto driverHandle = std::make_unique>(); - driverHandle->enableProgramDebugging = NEO::DebuggingMode::Online; + driverHandle->enableProgramDebugging = NEO::DebuggingMode::online; driverHandle->initialize(std::move(devices)); auto sipType = SipKernel::getSipKernelType(*neoDevice); diff --git a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp index 4ff4d36f01..7be681e76b 100644 --- a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp +++ b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp @@ -410,7 +410,7 @@ TEST(DriverTest, givenNullEnvVariableWhenCreatingDriverThenEnableProgramDebuggin auto driverHandle = whiteboxCast(static_cast<::L0::DriverHandleImp *>(DriverHandle::create(std::move(devices), envVariables, &returnValue))); EXPECT_NE(nullptr, driverHandle); - EXPECT_EQ(NEO::DebuggingMode::Disabled, driverHandle->enableProgramDebugging); + EXPECT_EQ(NEO::DebuggingMode::disabled, driverHandle->enableProgramDebugging); delete driverHandle; L0::globalDriver = nullptr; @@ -703,7 +703,7 @@ TEST(DriverTest, givenProgramDebuggingEnvVarValue1WhenCreatingDriverThenEnablePr auto driverHandle = whiteboxCast(static_cast<::L0::DriverHandleImp *>(DriverHandle::create(std::move(devices), envVariables, &returnValue))); EXPECT_NE(nullptr, driverHandle); - EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::Online); + EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::online); delete driverHandle; L0::globalDriver = nullptr; @@ -725,7 +725,7 @@ TEST(DriverTest, givenProgramDebuggingEnvVarValue2WhenCreatingDriverThenEnablePr auto driverHandle = whiteboxCast(static_cast<::L0::DriverHandleImp *>(DriverHandle::create(std::move(devices), envVariables, &returnValue))); EXPECT_NE(nullptr, driverHandle); - EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::Offline); + EXPECT_TRUE(driverHandle->enableProgramDebugging == NEO::DebuggingMode::offline); delete driverHandle; L0::globalDriver = nullptr; diff --git a/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp b/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp index b11efab6ba..5576d13aad 100644 --- a/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp +++ b/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp @@ -833,19 +833,19 @@ TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperUsingOverrideDebugKeyWhenGetting debugManager.flags.SelectCmdListHeapAddressModel.set(0); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); debugManager.flags.SelectCmdListHeapAddressModel.set(1); - EXPECT_EQ(NEO::HeapAddressModel::GlobalStateless, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); + EXPECT_EQ(NEO::HeapAddressModel::globalStateless, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); debugManager.flags.SelectCmdListHeapAddressModel.set(2); - EXPECT_EQ(NEO::HeapAddressModel::GlobalBindless, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); + EXPECT_EQ(NEO::HeapAddressModel::globalBindless, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); debugManager.flags.SelectCmdListHeapAddressModel.set(3); - EXPECT_EQ(NEO::HeapAddressModel::GlobalBindful, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); + EXPECT_EQ(NEO::HeapAddressModel::globalBindful, L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment)); } TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperUsingOverrideDebugKeyWhenGettingDispatchCmdListCmdBufferPrimaryThenUseDbgKeyValue) { diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_l0_gfx_core_helper_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_l0_gfx_core_helper_xe_hpc_core.cpp index 9ebcd18392..e511cef6b4 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_l0_gfx_core_helper_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_l0_gfx_core_helper_xe_hpc_core.cpp @@ -60,7 +60,7 @@ XE_HPC_CORETEST_F(L0GfxCoreHelperTestXeHpc, GivenXeHpcWhenCheckingL0HelperForRay XE_HPC_CORETEST_F(L0GfxCoreHelperTestXeHpc, GivenXeHpcWhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); } XE_HPC_CORETEST_F(L0GfxCoreHelperTestXeHpc, GivenXeHpcWhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/test_l0_gfx_core_helper_xe_hpg_core.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/test_l0_gfx_core_helper_xe_hpg_core.cpp index e16f0db43a..55e89a5310 100644 --- a/level_zero/core/test/unit_tests/xe_hpg_core/test_l0_gfx_core_helper_xe_hpg_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpg_core/test_l0_gfx_core_helper_xe_hpg_core.cpp @@ -67,7 +67,7 @@ XE_HPG_CORETEST_F(L0GfxCoreHelperTestXeHpg, GivenXeHpgWhenCheckingL0HelperForRay XE_HPG_CORETEST_F(L0GfxCoreHelperTestXeHpg, GivenXeHpgWhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::PrivateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); + EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel()); } XE_HPG_CORETEST_F(L0GfxCoreHelperTestXeHpg, GivenXeHpgWhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index 6178dfa370..551a073c16 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -201,9 +201,9 @@ cl_int CommandQueueHw::enqueueHandler(Surface **surfacesForResidency, productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, this->isOOQEnabled(), this->taskCount, computeCommandStreamReceiver); if (false == clearDependenciesForSubCapture) { if (false == canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies) { - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::onCsr); } - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::OutOfCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::outOfCsr); } auto allocator = computeCommandStreamReceiver.getTimestampPacketAllocator(); @@ -575,7 +575,7 @@ BlitProperties CommandQueueHw::processDispatchForBlitEnqueue(CommandS multiDispatchInfo.peekBuiltinOpParams()); if (!queueBlocked) { eventsRequest.fillCsrDependenciesForTimestampPacketContainer(blitProperties.csrDependencies, blitCommandStreamReceiver, - CsrDependencies::DependenciesType::All); + CsrDependencies::DependenciesType::all); blitProperties.csrDependencies.timestampPacketContainer.push_back(×tampPacketDependencies.cacheFlushNodes); blitProperties.csrDependencies.timestampPacketContainer.push_back(×tampPacketDependencies.previousEnqueueNodes); @@ -643,7 +643,7 @@ void CommandQueueHw::processDispatchForBlitAuxTranslation(CommandStre if (!queueBlocked) { CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, bcsCsr, CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, bcsCsr, CsrDependencies::DependenciesType::all); BlitProperties::setupDependenciesForAuxTranslation(blitPropertiesContainer, timestampPacketDependencies, *this->timestampPacketContainer, csrDeps, getGpgpuCommandStreamReceiver(), bcsCsr); @@ -1402,7 +1402,7 @@ cl_int CommandQueueHw::enqueueBlit(const MultiDispatchInfo &multiDisp BlitPropertiesContainer blitPropertiesContainer; CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, bcsCsr, CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, bcsCsr, CsrDependencies::DependenciesType::all); if (this->context->getRootDeviceIndices().size() > 1) { eventsRequest.fillCsrDependenciesForRootDevices(csrDeps, bcsCsr); } diff --git a/opencl/source/helpers/properties_helper.cpp b/opencl/source/helpers/properties_helper.cpp index a4a23fbe92..5319f1a638 100644 --- a/opencl/source/helpers/properties_helper.cpp +++ b/opencl/source/helpers/properties_helper.cpp @@ -51,9 +51,9 @@ void EventsRequest::fillCsrDependenciesForTimestampPacketContainer(CsrDependenci dependentCsr = &event->getCommandQueue()->getGpgpuCommandStreamReceiver(); } const auto sameCsr = (dependentCsr == ¤tCsr); - const auto pushDependency = (CsrDependencies::DependenciesType::OnCsr == depsType && sameCsr) || - (CsrDependencies::DependenciesType::OutOfCsr == depsType && !sameCsr) || - (CsrDependencies::DependenciesType::All == depsType); + const auto pushDependency = (CsrDependencies::DependenciesType::onCsr == depsType && sameCsr) || + (CsrDependencies::DependenciesType::outOfCsr == depsType && !sameCsr) || + (CsrDependencies::DependenciesType::all == depsType); if (pushDependency) { csrDeps.timestampPacketContainer.push_back(timestampPacketContainer); diff --git a/opencl/source/helpers/task_information.cpp b/opencl/source/helpers/task_information.cpp index 0a267c2144..b96b177bfe 100644 --- a/opencl/source/helpers/task_information.cpp +++ b/opencl/source/helpers/task_information.cpp @@ -171,7 +171,7 @@ CompletionStamp &CommandComputeKernel::submit(TaskCountType taskLevel, bool term if (kernelOperation->blitPropertiesContainer.size() > 0) { CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, *bcsCsrForAuxTranslation, CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, *bcsCsrForAuxTranslation, CsrDependencies::DependenciesType::all); BlitProperties::setupDependenciesForAuxTranslation(kernelOperation->blitPropertiesContainer, *timestampPacketDependencies, *currentTimestampPacketNodes, csrDeps, @@ -308,7 +308,7 @@ TaskCountType CommandWithoutKernel::dispatchBlitOperation() { UNRECOVERABLE_IF(kernelOperation->blitPropertiesContainer.size() != 1); auto &blitProperties = *kernelOperation->blitPropertiesContainer.begin(); - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(blitProperties.csrDependencies, *bcsCsr, CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(blitProperties.csrDependencies, *bcsCsr, CsrDependencies::DependenciesType::all); blitProperties.csrDependencies.timestampPacketContainer.push_back(×tampPacketDependencies->cacheFlushNodes); blitProperties.csrDependencies.timestampPacketContainer.push_back(×tampPacketDependencies->previousEnqueueNodes); blitProperties.csrDependencies.timestampPacketContainer.push_back(×tampPacketDependencies->barrierNodes); diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index bfbca0ced0..dfafe2c51e 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -181,10 +181,10 @@ cl_int Kernel::initialize() { pImplicitArgs->simdWidth = maxSimdSize; } auto ret = KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(kernelDescriptor.kernelAttributes, &pClDevice->getDevice()); - if (ret == NEO::KernelHelper::ErrorCode::INVALID_KERNEL) { + if (ret == NEO::KernelHelper::ErrorCode::invalidKernel) { return CL_INVALID_KERNEL; } - if (ret == NEO::KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY) { + if (ret == NEO::KernelHelper::ErrorCode::outOfDeviceMemory) { return CL_OUT_OF_RESOURCES; } diff --git a/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp b/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp index 03f2986e10..64d108e431 100644 --- a/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp +++ b/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp @@ -30,7 +30,7 @@ struct DebuggerClFixture void setUp() { hardwareInfo = *NEO::defaultHwInfo.get(); auto executionEnvironment = MockClDevice::prepareExecutionEnvironment(&hardwareInfo, rootDeviceIndex); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); device = MockDevice::createWithExecutionEnvironment(&hardwareInfo, executionEnvironment, rootDeviceIndex); ASSERT_NE(nullptr, device); clExecutionEnvironment = static_cast(device->getExecutionEnvironment()); diff --git a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp index 9fe44a00a2..952a65ac7c 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp @@ -80,7 +80,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledAndOoqWhenEstimat EventsRequest eventsRequest(numEventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; eventsRequest.fillCsrDependenciesForTimestampPacketContainer( - csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); getCommandStream(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr); auto sizeWithEnabled = mockCmdQHw->requestedCmdStreamSize; @@ -121,7 +121,7 @@ HWTEST_F(TimestampPacketTests, givenCrossCsrDependenciesWhenFillCsrDepsThenFlush EventsRequest eventsRequest(eventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::all); const auto &productHelper = device->getProductHelper(); if (productHelper.isDcFlushAllowed()) { @@ -173,7 +173,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEstimatingStr EventsRequest eventsRequest(numEventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); getCommandStream(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, isResolveDependenciesByPipeControlsEnabled, nullptr); auto sizeWithEnabled = mockCmdQHw->requestedCmdStreamSize; @@ -210,7 +210,7 @@ HWTEST_F(TimestampPacketTests, givenEventsRequestWithEventsWithoutTimestampsWhen EventsRequest eventsRequest(numEventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDepsEmpty; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDepsEmpty, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDepsEmpty, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); EXPECT_EQ(0u, csrDepsEmpty.timestampPacketContainer.size()); device->getUltCommandStreamReceiver().timestampPacketWriteEnabled = true; @@ -238,7 +238,7 @@ HWTEST_F(TimestampPacketTests, givenEventsRequestWithEventsWithoutTimestampsWhen cl_event waitlist2[] = {&event1, &eventWithEmptyTimestampContainer2, &event3, &eventWithEmptyTimestampContainer4, &event5}; EventsRequest eventsRequest2(numEventsOnWaitlist, waitlist2, nullptr); CsrDependencies csrDepsSize3; - eventsRequest2.fillCsrDependenciesForTimestampPacketContainer(csrDepsSize3, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest2.fillCsrDependenciesForTimestampPacketContainer(csrDepsSize3, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); EXPECT_EQ(3u, csrDepsSize3.timestampPacketContainer.size()); @@ -439,7 +439,7 @@ HWTEST_F(TimestampPacketTests, givenEventsRequestWhenEstimatingStreamSizeForCsrT auto sizeWithoutEvents = csr.getRequiredCmdStreamSize(flags, device->getDevice()); - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(flags.csrDependencies, csr, NEO::CsrDependencies::DependenciesType::OutOfCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(flags.csrDependencies, csr, NEO::CsrDependencies::DependenciesType::outOfCsr); auto sizeWithEvents = csr.getRequiredCmdStreamSize(flags, device->getDevice()); size_t sizeForNodeDependency = 0; @@ -487,7 +487,7 @@ HWTEST_F(TimestampPacketTests, givenEventsRequestWhenEstimatingStreamSizeForDiff auto sizeWithoutEvents = csr.getRequiredCmdStreamSize(flags, device->getDevice()); - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(flags.csrDependencies, csr, NEO::CsrDependencies::DependenciesType::OutOfCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(flags.csrDependencies, csr, NEO::CsrDependencies::DependenciesType::outOfCsr); auto sizeWithEvents = csr.getRequiredCmdStreamSize(flags, device->getDevice()); size_t sizeForNodeDependency = 0; @@ -1189,7 +1189,7 @@ HWTEST_F(TimestampPacketTests, givenAllDependencyTypesModeWhenFillingFromDiffere EventsRequest eventsRequest(eventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDependencies; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDependencies, csr1, CsrDependencies::DependenciesType::All); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDependencies, csr1, CsrDependencies::DependenciesType::all); EXPECT_EQ(static_cast(eventsOnWaitlist), csrDependencies.timestampPacketContainer.size()); } @@ -1397,7 +1397,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenDispatchingTh EventsRequest eventsRequest(eventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); HardwareInterfaceWalkerArgs walkerArgs = createHardwareInterfaceWalkerArgs(CL_COMMAND_NDRANGE_KERNEL); walkerArgs.currentTimestampPacketNodes = ×tamp7; @@ -1471,7 +1471,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledOnDifferentCSRsFr EventsRequest eventsRequest(eventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); HardwareInterfaceWalkerArgs walkerArgs = createHardwareInterfaceWalkerArgs(CL_COMMAND_NDRANGE_KERNEL); walkerArgs.currentTimestampPacketNodes = ×tamp7; @@ -1531,7 +1531,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledAndDependenciesRe EventsRequest eventsRequest(eventsOnWaitlist, waitlist, nullptr); CsrDependencies csrDeps; - eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr); + eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::onCsr); HardwareInterfaceWalkerArgs walkerArgs = createHardwareInterfaceWalkerArgs(CL_COMMAND_NDRANGE_KERNEL); HardwareInterface::template dispatchWalker( diff --git a/opencl/test/unit_test/linux/main_linux_dll.cpp b/opencl/test/unit_test/linux/main_linux_dll.cpp index 99709bbb6b..3b6bc6f6d5 100644 --- a/opencl/test/unit_test/linux/main_linux_dll.cpp +++ b/opencl/test/unit_test/linux/main_linux_dll.cpp @@ -710,7 +710,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV debugManager.flags.CreateMultipleSubDevices.set(2); debugManager.flags.UseVmBind.set(1); - mockExecutionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + mockExecutionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); auto drm = DrmWrap::createDrm(*mockRootDeviceEnvironment); ASSERT_NE(drm, nullptr); @@ -735,7 +735,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP debugManager.flags.UseVmBind.set(0); debugManager.flags.PrintDebugMessages.set(true); - mockRootDeviceEnvironment->executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + mockRootDeviceEnvironment->executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); auto drm = DrmWrap::createDrm(*mockRootDeviceEnvironment); EXPECT_NE(drm, nullptr); diff --git a/opencl/test/unit_test/platform/platform_tests.cpp b/opencl/test/unit_test/platform/platform_tests.cpp index a2801ac9b5..d43dde8ee0 100644 --- a/opencl/test/unit_test/platform/platform_tests.cpp +++ b/opencl/test/unit_test/platform/platform_tests.cpp @@ -432,7 +432,7 @@ TEST(PlatformInitTest, givenSingleDeviceWithNonZeroRootDeviceIndexInPassedDevice TEST(PlatformInitTest, GivenDebuggingEnabledWhenPlatformIsInitializedThenL0DebuggerIsCreated) { std::vector> devices; auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get(), false, 1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); devices.push_back(std::make_unique(executionEnvironment, 0)); auto status = platform()->initialize(std::move(devices)); EXPECT_TRUE(status); diff --git a/shared/source/built_ins/built_ins.cpp b/shared/source/built_ins/built_ins.cpp index 6cb549d637..1d6282ba1e 100644 --- a/shared/source/built_ins/built_ins.cpp +++ b/shared/source/built_ins/built_ins.cpp @@ -61,7 +61,7 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) { } sipBuiltIn.first.reset(new SipKernel(type, sipAllocation, std::move(stateSaveAreaHeader), std::move(sipBinary))); - if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == DebuggingMode::Offline) { + if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == DebuggingMode::offline) { sipBuiltIn.first->parseBinaryForContextId(); } }; diff --git a/shared/source/built_ins/sip_init.cpp b/shared/source/built_ins/sip_init.cpp index f85680892b..5eacf0b8dc 100644 --- a/shared/source/built_ins/sip_init.cpp +++ b/shared/source/built_ins/sip_init.cpp @@ -16,7 +16,7 @@ bool SipKernel::initSipKernel(SipKernelType type, Device &device) { } const SipKernel &SipKernel::getSipKernel(Device &device, OsContext *context) { - if (context && device.getExecutionEnvironment()->getDebuggingMode() == NEO::DebuggingMode::Offline) { + if (context && device.getExecutionEnvironment()->getDebuggingMode() == NEO::DebuggingMode::offline) { return SipKernel::getBindlessDebugSipKernel(device, context); } else { return SipKernel::getSipKernelImpl(device); diff --git a/shared/source/command_container/cmdcontainer.cpp b/shared/source/command_container/cmdcontainer.cpp index b2c36822c2..4787cd9613 100644 --- a/shared/source/command_container/cmdcontainer.cpp +++ b/shared/source/command_container/cmdcontainer.cpp @@ -81,7 +81,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat auto cmdBufferAllocation = this->obtainNextCommandBufferAllocation(); if (!cmdBufferAllocation) { - return ErrorCode::OUT_OF_DEVICE_MEMORY; + return ErrorCode::outOfDeviceMemory; } cmdBufferAllocations.push_back(cmdBufferAllocation); @@ -108,7 +108,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat auto cmdBufferAllocationHost = this->obtainNextCommandBufferAllocation(true); if (!cmdBufferAllocationHost) { - return ErrorCode::OUT_OF_DEVICE_MEMORY; + return ErrorCode::outOfDeviceMemory; } secondaryCommandStreamForImmediateCmdList = std::make_unique(cmdBufferAllocationHost->getUnderlyingBuffer(), usableSize, this, this->selectedBbCmdSize); @@ -135,7 +135,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat device->getRootDeviceIndex()); if (!allocationIndirectHeaps[i]) { - return ErrorCode::OUT_OF_DEVICE_MEMORY; + return ErrorCode::outOfDeviceMemory; } residencyContainer.push_back(allocationIndirectHeaps[i]); @@ -157,7 +157,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat iddBlock = nullptr; nextIddInBlock = this->getNumIddPerBlock(); } - return ErrorCode::SUCCESS; + return ErrorCode::success; } void CommandContainer::addToResidencyContainer(GraphicsAllocation *alloc) { @@ -579,7 +579,7 @@ bool CommandContainer::skipHeapAllocationCreation(HeapType heapType) { bool skipCreation = (globalBindlessHeapsEnabled && IndirectHeap::Type::SURFACE_STATE == heapType) || this->immediateCmdListSharedHeap(heapType) || (!hardwareInfo.capabilityTable.supportsImages && IndirectHeap::Type::DYNAMIC_STATE == heapType) || - (this->heapAddressModel != HeapAddressModel::PrivateHeaps); + (this->heapAddressModel != HeapAddressModel::privateHeaps); return skipCreation; } diff --git a/shared/source/command_container/cmdcontainer.h b/shared/source/command_container/cmdcontainer.h index 8e38013991..c5db090f87 100644 --- a/shared/source/command_container/cmdcontainer.h +++ b/shared/source/command_container/cmdcontainer.h @@ -61,8 +61,8 @@ struct HeapReserveArguments { class CommandContainer : public NonCopyableOrMovableClass { public: enum class ErrorCode { - SUCCESS = 0, - OUT_OF_DEVICE_MEMORY = 1 + success = 0, + outOfDeviceMemory = 1 }; static constexpr size_t defaultListCmdBufferSize = 1u * MemoryConstants ::megaByte; @@ -251,7 +251,7 @@ class CommandContainer : public NonCopyableOrMovableClass { uint32_t dirtyHeaps = std::numeric_limits::max(); uint32_t numIddsPerBlock = 64; - HeapAddressModel heapAddressModel = HeapAddressModel::PrivateHeaps; + HeapAddressModel heapAddressModel = HeapAddressModel::privateHeaps; uint32_t slmSize = std::numeric_limits::max(); uint32_t nextIddInBlock = 0; diff --git a/shared/source/command_stream/csr_deps.h b/shared/source/command_stream/csr_deps.h index cca21ecea7..1cd1927bc3 100644 --- a/shared/source/command_stream/csr_deps.h +++ b/shared/source/command_stream/csr_deps.h @@ -16,9 +16,9 @@ class CommandStreamReceiver; class CsrDependencies { public: enum class DependenciesType { - OnCsr, - OutOfCsr, - All + onCsr, + outOfCsr, + all }; StackVec multiRootTimeStampSyncContainer; diff --git a/shared/source/debugger/debugger.h b/shared/source/debugger/debugger.h index 905bc78dae..cfc1865808 100644 --- a/shared/source/debugger/debugger.h +++ b/shared/source/debugger/debugger.h @@ -40,25 +40,25 @@ class Debugger { }; enum class DebuggingMode : uint32_t { - Disabled, - Online, - Offline + disabled, + online, + offline }; inline DebuggingMode getDebuggingMode(uint32_t programDebugging) { switch (programDebugging) { case 1: { - return DebuggingMode::Online; + return DebuggingMode::online; } case 2: { - return DebuggingMode::Offline; + return DebuggingMode::offline; } case 0: default: { - return DebuggingMode::Disabled; + return DebuggingMode::disabled; } } } static_assert(std::is_standard_layout::value); -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/debugger/linux/debugger_l0_linux.cpp b/shared/source/debugger/linux/debugger_l0_linux.cpp index 4e7123de2f..605aec558e 100644 --- a/shared/source/debugger/linux/debugger_l0_linux.cpp +++ b/shared/source/debugger/linux/debugger_l0_linux.cpp @@ -24,8 +24,8 @@ bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) { const bool vmBindAvailable = drm->isVmBindAvailable(); const bool perContextVms = drm->isPerContextVMRequired(); - const bool allowDebug = (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::Offline) || - (perContextVms && drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::Online); + const bool allowDebug = (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::offline) || + (perContextVms && drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::online); if (vmBindAvailable && allowDebug) { drm->registerResourceClasses(); @@ -39,7 +39,7 @@ bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) { } void DebuggerL0::initSbaTrackingMode() { - if (device->getExecutionEnvironment()->getDebuggingMode() == DebuggingMode::Offline) { + if (device->getExecutionEnvironment()->getDebuggingMode() == DebuggingMode::offline) { singleAddressSpaceSbaTracking = true; } else { singleAddressSpaceSbaTracking = false; diff --git a/shared/source/dll/linux/drm_neo_create.cpp b/shared/source/dll/linux/drm_neo_create.cpp index 8dcfe4dfc3..854e2af151 100644 --- a/shared/source/dll/linux/drm_neo_create.cpp +++ b/shared/source/dll/linux/drm_neo_create.cpp @@ -98,7 +98,7 @@ Drm *Drm::create(std::unique_ptr &&hwDeviceId, RootDeviceEnvironm drm->queryPageFaultSupport(); if (rootDeviceEnvironment.executionEnvironment.isDebuggingEnabled()) { - if (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::Offline) { + if (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::offline) { drm->setPerContextVMRequired(false); } else { if (drm->isVmBindAvailable()) { diff --git a/shared/source/execution_environment/execution_environment.h b/shared/source/execution_environment/execution_environment.h index 0f10719984..79010b7279 100644 --- a/shared/source/execution_environment/execution_environment.h +++ b/shared/source/execution_environment/execution_environment.h @@ -41,7 +41,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject debuggingEnabledMode = debuggingMode; } DebuggingMode getDebuggingMode() const { return debuggingEnabledMode; } - bool isDebuggingEnabled() const { return debuggingEnabledMode != DebuggingMode::Disabled; } + bool isDebuggingEnabled() const { return debuggingEnabledMode != DebuggingMode::disabled; } void setMetricsEnabled(bool value) { this->metricsEnabled = value; } @@ -82,7 +82,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject bool subDevicesAsDevices = false; bool combinedDeviceHierarchy = false; - DebuggingMode debuggingEnabledMode = DebuggingMode::Disabled; + DebuggingMode debuggingEnabledMode = DebuggingMode::disabled; std::unordered_map rootDeviceNumCcsMap; std::mutex initializeDirectSubmissionControllerMutex; }; diff --git a/shared/source/helpers/heap_base_address_model.h b/shared/source/helpers/heap_base_address_model.h index 8cc7fcdf00..d2cd080444 100644 --- a/shared/source/helpers/heap_base_address_model.h +++ b/shared/source/helpers/heap_base_address_model.h @@ -17,26 +17,26 @@ enum class HeapAddressModel : uint32_t { * Heaps are allocated and owned by each command list. * Command lists will require to reload SBA command before execution. */ - PrivateHeaps = 0, + privateHeaps = 0, /* * Global stateless - command list can use only stateless addressing. * Surface state heap is allocated per context for driver's allocations only (debug and scratch) * Command lists do not require SBA command reload. SBA is dispatched only once for heap addresses. */ - GlobalStateless = 1, + globalStateless = 1, /* * Global bindless - command list can use stateless or bindless addressing. * Surface and dynamic heaps are allocated in global, 4GB allocator for all allocations and samplers used. * Command lists do not require SBA command reload. SBA is dispatched only once for heap addresses. */ - GlobalBindless = 2, + globalBindless = 2, /* * Global bindful - command list can use any addressing. * Surface and dynamic heaps are allocated in global, 4GB allocator for all allocations and samplers used. * Binding table base address is programed by special heap manager that provides and reuses space for bti * Command lists might require dynamic binding table base address command reload when binding table heap manager requires to reload base address. */ - GlobalBindful = 3 + globalBindful = 3 }; } // namespace NEO diff --git a/shared/source/helpers/kernel_helpers.cpp b/shared/source/helpers/kernel_helpers.cpp index a3a863900c..c82e2d7961 100644 --- a/shared/source/helpers/kernel_helpers.cpp +++ b/shared/source/helpers/kernel_helpers.cpp @@ -53,7 +53,7 @@ KernelHelper::ErrorCode KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(Ker auto &gfxCoreHelper = device->getRootDeviceEnvironment().getHelper(); uint32_t maxScratchSize = gfxCoreHelper.getMaxScratchSize(); if ((attributes.perThreadScratchSize[0] > maxScratchSize) || (attributes.perThreadScratchSize[1] > maxScratchSize)) { - return KernelHelper::ErrorCode::INVALID_KERNEL; + return KernelHelper::ErrorCode::invalidKernel; } auto globalMemorySize = device->getDeviceInfo().globalMemSize; auto computeUnitsForScratch = device->getDeviceInfo().computeUnitsUsedForScratch; @@ -80,9 +80,9 @@ KernelHelper::ErrorCode KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(Ker totalScratchSize > globalMemorySize || totalPrivateScratchSize > globalMemorySize) { - return KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY; + return KernelHelper::ErrorCode::outOfDeviceMemory; } - return KernelHelper::ErrorCode::SUCCESS; + return KernelHelper::ErrorCode::success; } bool KernelHelper::isAnyArgumentPtrByValue(const KernelDescriptor &kernelDescriptor) { diff --git a/shared/source/helpers/kernel_helpers.h b/shared/source/helpers/kernel_helpers.h index cb5b61c605..4ae13da9ec 100644 --- a/shared/source/helpers/kernel_helpers.h +++ b/shared/source/helpers/kernel_helpers.h @@ -17,9 +17,9 @@ class Device; struct KernelHelper { enum class ErrorCode { - SUCCESS = 0, - OUT_OF_DEVICE_MEMORY = 1, - INVALID_KERNEL = 2 + success = 0, + outOfDeviceMemory = 1, + invalidKernel = 2 }; static uint32_t getMaxWorkGroupCount(uint32_t simd, uint32_t availableThreadCount, uint32_t dssCount, uint32_t availableSlmSize, uint32_t usedSlmSize, uint32_t maxBarrierCount, uint32_t numberOfBarriers, uint32_t workDim, diff --git a/shared/source/memory_manager/allocation_properties.h b/shared/source/memory_manager/allocation_properties.h index 6552d79051..3d46391d57 100644 --- a/shared/source/memory_manager/allocation_properties.h +++ b/shared/source/memory_manager/allocation_properties.h @@ -117,7 +117,7 @@ struct AllocationData { static_assert(sizeof(AllocationData::flags) == sizeof(AllocationData::allFlags), ""); AllocationType type = AllocationType::unknown; GraphicsAllocation::UsmInitialPlacement usmInitialPlacement = GraphicsAllocation::UsmInitialPlacement::DEFAULT; - GfxMemoryAllocationMethod allocationMethod = GfxMemoryAllocationMethod::NotDefined; + GfxMemoryAllocationMethod allocationMethod = GfxMemoryAllocationMethod::notDefined; const void *hostPtr = nullptr; uint64_t gpuAddress = 0; size_t size = 0; diff --git a/shared/source/memory_manager/allocation_type.h b/shared/source/memory_manager/allocation_type.h index 0ee3bb9555..de7f9724a9 100644 --- a/shared/source/memory_manager/allocation_type.h +++ b/shared/source/memory_manager/allocation_type.h @@ -62,8 +62,8 @@ enum class AllocationType { }; enum class GfxMemoryAllocationMethod : uint32_t { - UseUmdSystemPtr, - AllocateByKmd, - NotDefined = std::numeric_limits::max() + useUmdSystemPtr, + allocateByKmd, + notDefined = std::numeric_limits::max() }; } // namespace NEO diff --git a/shared/source/memory_manager/host_ptr_defines.h b/shared/source/memory_manager/host_ptr_defines.h index 9f4b2c9881..c96271560a 100644 --- a/shared/source/memory_manager/host_ptr_defines.h +++ b/shared/source/memory_manager/host_ptr_defines.h @@ -24,19 +24,19 @@ struct ResidencyData; constexpr int maxFragmentsCount = 3; enum class FragmentPosition { - NONE = 0, - LEADING, - MIDDLE, - TRAILING + none = 0, + leading, + middle, + trailing }; enum class RequirementsStatus { - SUCCESS = 0, - FATAL + success = 0, + fatal }; struct PartialAllocation { - FragmentPosition fragmentPosition = FragmentPosition::NONE; + FragmentPosition fragmentPosition = FragmentPosition::none; const void *allocationPtr = nullptr; size_t allocationSize = 0u; }; diff --git a/shared/source/memory_manager/host_ptr_manager.cpp b/shared/source/memory_manager/host_ptr_manager.cpp index f73806f491..8b7f22c958 100644 --- a/shared/source/memory_manager/host_ptr_manager.cpp +++ b/shared/source/memory_manager/host_ptr_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -53,7 +53,7 @@ AllocationRequirements HostPtrManager::getAllocationRequirements(uint32_t rootDe if (alignedStartAddress != inputPtr) { leadingNeeded = true; requiredAllocations.allocationFragments[allocationCount].allocationPtr = alignedStartAddress; - requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::LEADING; + requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::leading; requiredAllocations.allocationFragments[allocationCount].allocationSize = MemoryConstants::pageSize; allocationCount++; } @@ -69,14 +69,14 @@ AllocationRequirements HostPtrManager::getAllocationRequirements(uint32_t rootDe auto middleSize = wholeAllocationSize - (trailingNeeded + leadingNeeded) * MemoryConstants::pageSize; if (middleSize) { requiredAllocations.allocationFragments[allocationCount].allocationPtr = alignUp(inputPtr, MemoryConstants::pageSize); - requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::MIDDLE; + requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::middle; requiredAllocations.allocationFragments[allocationCount].allocationSize = middleSize; allocationCount++; } if (trailingNeeded) { requiredAllocations.allocationFragments[allocationCount].allocationPtr = alignedEndAddress; - requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::TRAILING; + requiredAllocations.allocationFragments[allocationCount].fragmentPosition = FragmentPosition::trailing; requiredAllocations.allocationFragments[allocationCount].allocationSize = MemoryConstants::pageSize; allocationCount++; } @@ -249,7 +249,7 @@ FragmentStorage *HostPtrManager::getFragmentAndCheckForOverlaps(uint32_t rootDev OsHandleStorage HostPtrManager::prepareOsStorageForAllocation(MemoryManager &memoryManager, size_t size, const void *ptr, uint32_t rootDeviceIndex) { std::lock_guard lock(allocationsMutex); auto requirements = HostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); - UNRECOVERABLE_IF(checkAllocationsForOverlapping(memoryManager, &requirements) == RequirementsStatus::FATAL); + UNRECOVERABLE_IF(checkAllocationsForOverlapping(memoryManager, &requirements) == RequirementsStatus::fatal); auto osStorage = populateAlreadyAllocatedFragments(requirements); if (osStorage.fragmentCount > 0) { if (memoryManager.populateOsHandles(osStorage, rootDeviceIndex) != MemoryManager::AllocationStatus::Success) { @@ -263,7 +263,7 @@ OsHandleStorage HostPtrManager::prepareOsStorageForAllocation(MemoryManager &mem RequirementsStatus HostPtrManager::checkAllocationsForOverlapping(MemoryManager &memoryManager, AllocationRequirements *requirements) { UNRECOVERABLE_IF(requirements == nullptr); - RequirementsStatus status = RequirementsStatus::SUCCESS; + RequirementsStatus status = RequirementsStatus::success; for (unsigned int i = 0; i < requirements->requiredFragmentsCount; i++) { OverlapStatus overlapStatus = OverlapStatus::FRAGMENT_NOT_CHECKED; @@ -286,7 +286,7 @@ RequirementsStatus HostPtrManager::checkAllocationsForOverlapping(MemoryManager getFragmentAndCheckForOverlaps(requirements->rootDeviceIndex, requirements->allocationFragments[i].allocationPtr, requirements->allocationFragments[i].allocationSize, overlapStatus); if (overlapStatus == OverlapStatus::FRAGMENT_OVERLAPING_AND_BIGGER_THEN_STORED_FRAGMENT) { - status = RequirementsStatus::FATAL; + status = RequirementsStatus::fatal; break; } } diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index e4b37c6dc2..73b9b4d750 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -536,7 +536,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo } GfxMemoryAllocationMethod MemoryManager::getPreferredAllocationMethod(const AllocationProperties &allocationProperties) const { - return GfxMemoryAllocationMethod::NotDefined; + return GfxMemoryAllocationMethod::notDefined; } GraphicsAllocation *MemoryManager::allocatePhysicalGraphicsMemory(const AllocationProperties &properties) { diff --git a/shared/source/os_interface/linux/ioctl_helper.cpp b/shared/source/os_interface/linux/ioctl_helper.cpp index adccc11629..f3438b09f6 100644 --- a/shared/source/os_interface/linux/ioctl_helper.cpp +++ b/shared/source/os_interface/linux/ioctl_helper.cpp @@ -99,7 +99,7 @@ int IoctlHelper::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_t const auto numberOfCCS = drm.getRootDeviceEnvironment().getHardwareInfo()->gtSystemInfo.CCSInfo.NumberOfCCSEnabled; const bool debuggableContext = drm.isContextDebugSupported() && drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled() && !osContext.isInternalEngine(); - const bool debuggableContextCooperative = drm.getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::Offline ? false : (debuggableContext && numberOfCCS > 0); + const bool debuggableContextCooperative = drm.getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::offline ? false : (debuggableContext && numberOfCCS > 0); auto drmContextId = drm.createDrmContext(drmVmId, drm.isVmBindAvailable(), osContext.isCooperativeEngine() || debuggableContextCooperative); if (drmContextId < 0) { return drmContextId; diff --git a/shared/source/os_interface/windows/max_chunk_size_drm_or_wddm.cpp b/shared/source/os_interface/windows/max_chunk_size_drm_or_wddm.cpp index 67588f7b22..078dd4abb7 100644 --- a/shared/source/os_interface/windows/max_chunk_size_drm_or_wddm.cpp +++ b/shared/source/os_interface/windows/max_chunk_size_drm_or_wddm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,10 +9,10 @@ namespace NEO { -const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::AllocateByKmd; +const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::allocateByKmd; size_t WddmMemoryManager::getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod allocationMethod) const { - if (GfxMemoryAllocationMethod::AllocateByKmd == allocationMethod) { + if (GfxMemoryAllocationMethod::allocateByKmd == allocationMethod) { return 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k; } else { return 31 * MemoryConstants::megaByte; diff --git a/shared/source/os_interface/windows/max_chunk_size_wddm.cpp b/shared/source/os_interface/windows/max_chunk_size_wddm.cpp index efc470ee7f..e59d0693d1 100644 --- a/shared/source/os_interface/windows/max_chunk_size_wddm.cpp +++ b/shared/source/os_interface/windows/max_chunk_size_wddm.cpp @@ -9,7 +9,7 @@ namespace NEO { -const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::UseUmdSystemPtr; +const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::useUmdSystemPtr; size_t WddmMemoryManager::getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod allocationMethod) const { return 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k; diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index dd0718724a..7218ec2a40 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -134,7 +134,7 @@ GraphicsAllocation *WddmMemoryManager::allocatePhysicalDeviceMemory(const Alloca } GraphicsAllocation *WddmMemoryManager::allocateMemoryByKMD(const AllocationData &allocationData) { - if (allocationData.size > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::AllocateByKmd)) { + if (allocationData.size > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd)) { return allocateHugeGraphicsMemory(allocationData, false); } @@ -191,13 +191,13 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToC } size_t sizeAligned = alignUp(allocationData.size, allowLargePages ? MemoryConstants::pageSize64k : MemoryConstants::pageSize); - if (sizeAligned > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::AllocateByKmd)) { + if (sizeAligned > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd)) { const bool isBufferHostMemory = allocationData.type == NEO::AllocationType::bufferHostMemory; return allocateHugeGraphicsMemory(allocationData, isBufferHostMemory); } // algin gpu address of device part of usm shared allocation to 64kb for WSL2 - auto alignGpuAddressTo64KB = allocationData.allocationMethod == GfxMemoryAllocationMethod::AllocateByKmd && allocationData.makeGPUVaDifferentThanCPUPtr; + auto alignGpuAddressTo64KB = allocationData.allocationMethod == GfxMemoryAllocationMethod::allocateByKmd && allocationData.makeGPUVaDifferentThanCPUPtr; if (alignGpuAddressTo64KB) { sizeAligned = sizeAligned + allocationData.alignment; @@ -287,7 +287,7 @@ GraphicsAllocation *WddmMemoryManager::allocateHugeGraphicsMemory(const Allocati } } - auto chunkSize = getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::UseUmdSystemPtr); + auto chunkSize = getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::useUmdSystemPtr); auto numGmms = (alignedSize + chunkSize - 1) / chunkSize; auto gmmHelper = getGmmHelper(allocationData.rootDeviceIndex); auto canonizedAddress = gmmHelper->canonize(castToUint64(const_cast(hostPtr))); @@ -357,7 +357,7 @@ GraphicsAllocation *WddmMemoryManager::allocateUSMHostGraphicsMemory(const Alloc GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryWithAlignment(const AllocationData &allocationData) { auto pageSize = NEO::OSInterface::osEnabled64kbPages ? MemoryConstants::pageSize64k : MemoryConstants::pageSize; bool requiresNonStandardAlignment = allocationData.alignment > pageSize; - if ((allocationData.allocationMethod == GfxMemoryAllocationMethod::UseUmdSystemPtr) || (requiresNonStandardAlignment && allocationData.forceKMDAllocation == false)) { + if ((allocationData.allocationMethod == GfxMemoryAllocationMethod::useUmdSystemPtr) || (requiresNonStandardAlignment && allocationData.forceKMDAllocation == false)) { return allocateSystemMemoryAndCreateGraphicsAllocationFromIt(allocationData); } else { return allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(allocationData, NEO::OSInterface::osEnabled64kbPages); @@ -367,7 +367,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryWithAlignment(const GraphicsAllocation *WddmMemoryManager::allocateSystemMemoryAndCreateGraphicsAllocationFromIt(const AllocationData &allocationData) { size_t newAlignment = allocationData.alignment ? alignUp(allocationData.alignment, MemoryConstants::pageSize) : MemoryConstants::pageSize; size_t sizeAligned = allocationData.size ? alignUp(allocationData.size, MemoryConstants::pageSize) : MemoryConstants::pageSize; - if (sizeAligned > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::UseUmdSystemPtr)) { + if (sizeAligned > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::useUmdSystemPtr)) { return allocateHugeGraphicsMemory(allocationData, true); } void *pSysMem = allocateSystemMemory(sizeAligned, newAlignment); @@ -425,7 +425,7 @@ GraphicsAllocation *WddmMemoryManager::allocateSystemMemoryAndCreateGraphicsAllo GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForNonSvmHostPtr(const AllocationData &allocationData) { auto alignedSize = alignSizeWholePage(allocationData.hostPtr, allocationData.size); - if (alignedSize > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::UseUmdSystemPtr)) { + if (alignedSize > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::useUmdSystemPtr)) { return allocateHugeGraphicsMemory(allocationData, false); } @@ -461,7 +461,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForNonSvmHostPtr(co } GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryWithHostPtr(const AllocationData &allocationData) { - if (allocationData.size > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::UseUmdSystemPtr)) { + if (allocationData.size > getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::useUmdSystemPtr)) { return allocateHugeGraphicsMemory(allocationData, false); } @@ -518,7 +518,7 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All ptrAligned = alignDown(allocationData.hostPtr, MemoryConstants::allocationAlignment); sizeAligned = alignSizeWholePage(allocationData.hostPtr, sizeAligned); offset = ptrDiff(allocationData.hostPtr, ptrAligned); - } else if (allocationData.allocationMethod == GfxMemoryAllocationMethod::UseUmdSystemPtr) { + } else if (allocationData.allocationMethod == GfxMemoryAllocationMethod::useUmdSystemPtr) { sizeAligned = alignUp(sizeAligned, MemoryConstants::allocationAlignment); pSysMem = allocateSystemMemory(sizeAligned, MemoryConstants::allocationAlignment); if (pSysMem == nullptr) { @@ -547,7 +547,7 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All auto hwInfo = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getHardwareInfo(); StorageInfo storageInfo{}; - storageInfo.isLockable = allocationData.allocationMethod != GfxMemoryAllocationMethod::UseUmdSystemPtr; + storageInfo.isLockable = allocationData.allocationMethod != GfxMemoryAllocationMethod::useUmdSystemPtr; GmmRequirements gmmRequirements{}; gmmRequirements.allowLargePages = true; @@ -1318,7 +1318,7 @@ GraphicsAllocation *WddmMemoryManager::allocatePhysicalLocalDeviceMemory(const A gmmRequirements); } - const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::AllocateByKmd), alignment); + const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd), alignment); const size_t numGmms = (static_cast(sizeAligned) + chunkSize - 1) / chunkSize; auto wddmAllocation = std::make_unique(allocationData.rootDeviceIndex, singleBankAllocation ? numGmms : numBanks, @@ -1404,7 +1404,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryInDevicePool(const } } - const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::AllocateByKmd), alignment); + const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd), alignment); const size_t numGmms = (static_cast(sizeAligned) + chunkSize - 1) / chunkSize; auto wddmAllocation = std::make_unique(allocationData.rootDeviceIndex, singleBankAllocation ? numGmms : numBanks, diff --git a/shared/source/release_helper/release_helper_common_xe_lpg.inl b/shared/source/release_helper/release_helper_common_xe_lpg.inl index f19493246f..44a935047c 100644 --- a/shared/source/release_helper/release_helper_common_xe_lpg.inl +++ b/shared/source/release_helper/release_helper_common_xe_lpg.inl @@ -22,7 +22,7 @@ std::optional ReleaseHelperHw::getPreferredA case AllocationType::timestampPacketTagBuffer: return {}; default: - return GfxMemoryAllocationMethod::AllocateByKmd; + return GfxMemoryAllocationMethod::allocateByKmd; } } diff --git a/shared/test/common/helpers/sip_init.cpp b/shared/test/common/helpers/sip_init.cpp index 5bfef6f03d..0ab6078c9b 100644 --- a/shared/test/common/helpers/sip_init.cpp +++ b/shared/test/common/helpers/sip_init.cpp @@ -161,7 +161,7 @@ const SipKernel &SipKernel::getSipKernel(Device &device, OsContext *context) { if (MockSipData::useMockSip) { return *MockSipData::mockSipKernel.get(); } else { - if (context && device.getExecutionEnvironment()->getDebuggingMode() == NEO::DebuggingMode::Offline) { + if (context && device.getExecutionEnvironment()->getDebuggingMode() == NEO::DebuggingMode::offline) { return SipKernel::getBindlessDebugSipKernel(device, context); } auto sipType = SipKernel::getSipKernelType(device); diff --git a/shared/test/common/libult/linux/drm_mock.cpp b/shared/test/common/libult/linux/drm_mock.cpp index 0d9e933ce3..6e38b008e7 100644 --- a/shared/test/common/libult/linux/drm_mock.cpp +++ b/shared/test/common/libult/linux/drm_mock.cpp @@ -24,7 +24,7 @@ DrmMock::DrmMock(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std sliceCountChangeSupported = true; if (rootDeviceEnvironment.executionEnvironment.isDebuggingEnabled()) { - if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == DebuggingMode::Offline) { + if (rootDeviceEnvironment.executionEnvironment.getDebuggingMode() == DebuggingMode::offline) { setPerContextVMRequired(false); } else { setPerContextVMRequired(true); diff --git a/shared/test/common/os_interface/linux/drm_neo_create.cpp b/shared/test/common/os_interface/linux/drm_neo_create.cpp index 37c4c61ca3..c8fb48611b 100644 --- a/shared/test/common/os_interface/linux/drm_neo_create.cpp +++ b/shared/test/common/os_interface/linux/drm_neo_create.cpp @@ -49,7 +49,7 @@ Drm *Drm::create(std::unique_ptr &&hwDeviceId, RootDeviceEnvironm drm->queryPageFaultSupport(); if (rootDeviceEnvironment.executionEnvironment.isDebuggingEnabled()) { - if (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::Offline) { + if (drm->getRootDeviceEnvironment().executionEnvironment.getDebuggingMode() == DebuggingMode::offline) { drm->setPerContextVMRequired(false); } else { if (drm->isVmBindAvailable()) { diff --git a/shared/test/unit_test/built_ins/sip_tests.cpp b/shared/test/unit_test/built_ins/sip_tests.cpp index abe2c279d3..603567cb88 100644 --- a/shared/test/unit_test/built_ins/sip_tests.cpp +++ b/shared/test/unit_test/built_ins/sip_tests.cpp @@ -499,7 +499,7 @@ TEST(DebugBindlessSip, givenOfflineDebuggingModeWhenGettingSipForContextThenCorr auto builtIns = new NEO::MockBuiltins(); builtIns->callBaseGetSipKernel = true; executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(builtIns); - executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(DebuggingMode::offline); const uint32_t contextId = 0u; std::unique_ptr osContext(OsContext::create(executionEnvironment->rootDeviceEnvironments[0]->osInterface.get(), @@ -629,7 +629,7 @@ TEST(DebugBindlessSip, givenOfflineDebuggingModeWhenSipIsInitializedThenBinaryIs auto builtIns = new NEO::MockBuiltins(); builtIns->callBaseGetSipKernel = true; executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(builtIns); - executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(DebuggingMode::offline); auto osContext = std::make_unique(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular})); osContext->debuggableContext = true; @@ -666,7 +666,7 @@ TEST(DebugBindlessSip, givenOfflineDebuggingModeAndInvalidSipWhenSipIsInitialize auto builtIns = new NEO::MockBuiltins(); builtIns->callBaseGetSipKernel = true; executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(builtIns); - executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(DebuggingMode::offline); auto osContext = std::make_unique(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular})); osContext->debuggableContext = true; @@ -703,7 +703,7 @@ TEST(DebugBindlessSip, givenOfflineDebuggingModeWhenDebugSipForContextIsCreatedT auto builtIns = new NEO::MockBuiltins(); builtIns->callBaseGetSipKernel = true; executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(builtIns); - executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(DebuggingMode::offline); auto osContext = std::make_unique(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular})); osContext->debuggableContext = true; diff --git a/shared/test/unit_test/command_container/command_container_tests.cpp b/shared/test/unit_test/command_container/command_container_tests.cpp index edb1b82908..8ddf58b946 100644 --- a/shared/test/unit_test/command_container/command_container_tests.cpp +++ b/shared/test/unit_test/command_container/command_container_tests.cpp @@ -161,7 +161,7 @@ TEST_F(CommandContainerTest, givenCmdContainerWhenAllocatingHeapsThenSetCorrectA TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenEverythingIsInitialized) { CommandContainer cmdContainer; auto status = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, status); + EXPECT_EQ(CommandContainer::ErrorCode::success, status); EXPECT_EQ(pDevice, cmdContainer.getDevice()); EXPECT_NE(cmdContainer.getHeapHelper(), nullptr); @@ -192,7 +192,7 @@ TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenEverythingIs TEST_F(CommandContainerTest, givenCommandContainerWhenHeapNotRequiredThenHeapIsNotInitialized) { CommandContainer cmdContainer; auto status = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, false, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, status); + EXPECT_EQ(CommandContainer::ErrorCode::success, status); EXPECT_EQ(pDevice, cmdContainer.getDevice()); EXPECT_EQ(cmdContainer.getHeapHelper(), nullptr); @@ -229,7 +229,7 @@ TEST_F(CommandContainerTest, givenEnabledLocalMemoryAndIsaInSystemMemoryWhenCmdC CommandContainer cmdContainer; auto status = cmdContainer.initialize(device.get(), nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, status); + EXPECT_EQ(CommandContainer::ErrorCode::success, status); EXPECT_EQ(instructionHeapBaseAddress, cmdContainer.getInstructionHeapBaseAddress()); } @@ -248,7 +248,7 @@ TEST_F(CommandContainerTest, givenForceDefaultHeapSizeWhenCmdContainerIsInitiali CommandContainer cmdContainer; auto status = cmdContainer.initialize(device.get(), nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, status); + EXPECT_EQ(CommandContainer::ErrorCode::success, status); auto indirectHeap = cmdContainer.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT); EXPECT_EQ(indirectHeap->getAvailableSpace(), 32 * MemoryConstants::kiloByte); @@ -258,14 +258,14 @@ TEST_F(CommandContainerTest, givenCommandContainerDuringInitWhenAllocateGfxMemor CommandContainer cmdContainer; pDevice->executionEnvironment->memoryManager.reset(new FailMemoryManager(0, *pDevice->executionEnvironment)); auto status = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::OUT_OF_DEVICE_MEMORY, status); + EXPECT_EQ(CommandContainer::ErrorCode::outOfDeviceMemory, status); } TEST_F(CommandContainerTest, givenCreateSecondaryCmdBufferInHostMemWhenAllocateSecondaryCmdStreamFailsDuringInitializeThenErrorIsReturned) { CommandContainer cmdContainer; static_cast(pDevice->getMemoryManager())->maxSuccessAllocatedGraphicsMemoryIndex = 7; auto status = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, true); - EXPECT_EQ(CommandContainer::ErrorCode::OUT_OF_DEVICE_MEMORY, status); + EXPECT_EQ(CommandContainer::ErrorCode::outOfDeviceMemory, status); } TEST_F(CommandContainerTest, givenCmdContainerWithAllocsListWhenAllocateAndResetThenCmdBufferAllocIsReused) { @@ -331,7 +331,7 @@ TEST_F(CommandContainerTest, givenCommandContainerDuringInitWhenAllocateHeapMemo auto tempMemoryManager = pDevice->executionEnvironment->memoryManager.release(); pDevice->executionEnvironment->memoryManager.reset(new FailMemoryManager(1, *pDevice->executionEnvironment)); auto status = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::OUT_OF_DEVICE_MEMORY, status); + EXPECT_EQ(CommandContainer::ErrorCode::outOfDeviceMemory, status); delete tempMemoryManager; } @@ -1022,7 +1022,7 @@ HWTEST_F(CommandContainerTest, givenCmdContainerHasImmediateCsrWhenGettingHeapWi cmdContainer.setNumIddPerBlock(1); auto code = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, code); + EXPECT_EQ(CommandContainer::ErrorCode::success, code); EXPECT_EQ(nullptr, cmdContainer.getIndirectHeap(HeapType::DYNAMIC_STATE)); EXPECT_EQ(nullptr, cmdContainer.getIndirectHeap(HeapType::SURFACE_STATE)); @@ -1198,7 +1198,7 @@ HWTEST_F(CommandContainerTest, givenCmdContainerUsedInRegularCmdListWhenGettingH HeapReserveArguments dshReserveArgs = {dshHeapPtr, 0, dshAlign}; auto code = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, code); + EXPECT_EQ(CommandContainer::ErrorCode::success, code); cmdContainer.reserveSpaceForDispatch(sshReserveArgs, dshReserveArgs, true); @@ -1246,7 +1246,7 @@ HWTEST_F(CommandContainerTest, givenCmdContainerUsingPrivateHeapsWhenGettingRese HeapReserveArguments dshReserveArgs = {dshHeapPtr, 0, dshAlign}; auto code = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, code); + EXPECT_EQ(CommandContainer::ErrorCode::success, code); constexpr size_t nonZeroSshSize = 4 * MemoryConstants::kiloByte; constexpr size_t nonZeroDshSize = 4 * MemoryConstants::kiloByte + 64; @@ -1289,7 +1289,7 @@ HWTEST_F(CommandContainerTest, cmdContainer.setNumIddPerBlock(1); auto code = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EXPECT_EQ(CommandContainer::ErrorCode::SUCCESS, code); + EXPECT_EQ(CommandContainer::ErrorCode::success, code); constexpr size_t misalignedSize = 11; sshReserveArgs.size = misalignedSize; @@ -1638,19 +1638,19 @@ TEST_F(CommandContainerTest, givenCmdContainerWhenFillReusableAllocationListsAnd } TEST_F(CommandContainerHeapStateTests, givenCmdContainerWhenSettingHeapAddressModelThenGeterReturnsTheSameValue) { - myCommandContainer.setHeapAddressModel(HeapAddressModel::GlobalStateless); - EXPECT_EQ(HeapAddressModel::GlobalStateless, myCommandContainer.getHeapAddressModel()); + myCommandContainer.setHeapAddressModel(HeapAddressModel::globalStateless); + EXPECT_EQ(HeapAddressModel::globalStateless, myCommandContainer.getHeapAddressModel()); - myCommandContainer.setHeapAddressModel(HeapAddressModel::GlobalBindless); - EXPECT_EQ(HeapAddressModel::GlobalBindless, myCommandContainer.getHeapAddressModel()); + myCommandContainer.setHeapAddressModel(HeapAddressModel::globalBindless); + EXPECT_EQ(HeapAddressModel::globalBindless, myCommandContainer.getHeapAddressModel()); - myCommandContainer.setHeapAddressModel(HeapAddressModel::GlobalBindful); - EXPECT_EQ(HeapAddressModel::GlobalBindful, myCommandContainer.getHeapAddressModel()); + myCommandContainer.setHeapAddressModel(HeapAddressModel::globalBindful); + EXPECT_EQ(HeapAddressModel::globalBindful, myCommandContainer.getHeapAddressModel()); } TEST_F(CommandContainerTest, givenGlobalHeapModelSelectedWhenCmdContainerIsInitializedThenNoSurfaceAndDynamicHeapCreated) { MyMockCommandContainer cmdContainer; - cmdContainer.setHeapAddressModel(HeapAddressModel::GlobalStateless); + cmdContainer.setHeapAddressModel(HeapAddressModel::globalStateless); cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); EXPECT_EQ(nullptr, cmdContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE)); diff --git a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp index f78dd8259f..2046eba8b2 100644 --- a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -4428,7 +4428,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, using STATE_SIP = typename FamilyType::STATE_SIP; pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->initDebuggerL0(pDevice); - pDevice->getExecutionEnvironment()->setDebuggingMode(DebuggingMode::Offline); + pDevice->getExecutionEnvironment()->setDebuggingMode(DebuggingMode::offline); auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); commandStreamReceiver.storeMakeResidentAllocations = true; diff --git a/shared/test/unit_test/debugger/linux/test_l0_debugger_linux.cpp b/shared/test/unit_test/debugger/linux/test_l0_debugger_linux.cpp index 8823ce6d87..ea23bfe9fc 100644 --- a/shared/test/unit_test/debugger/linux/test_l0_debugger_linux.cpp +++ b/shared/test/unit_test/debugger/linux/test_l0_debugger_linux.cpp @@ -31,7 +31,7 @@ struct L0DebuggerSharedLinuxFixture { void setUp(HardwareInfo *hwInfo) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo ? hwInfo : defaultHwInfo.get()); executionEnvironment->initializeMemoryManager(); auto osInterface = new OSInterface(); @@ -100,7 +100,7 @@ HWTEST_F(SingleAddressSpaceLinuxFixture, givenDebuggingModeOfflineWhenDebuggerIs auto debugger = std::make_unique>(pDevice); EXPECT_FALSE(debugger->singleAddressSpaceSbaTracking); - pDevice->getExecutionEnvironment()->setDebuggingMode(DebuggingMode::Offline); + pDevice->getExecutionEnvironment()->setDebuggingMode(DebuggingMode::offline); debugger = std::make_unique>(pDevice); EXPECT_TRUE(debugger->singleAddressSpaceSbaTracking); diff --git a/shared/test/unit_test/debugger/test_l0_debugger.cpp b/shared/test/unit_test/debugger/test_l0_debugger.cpp index e635a41b01..30f51c6062 100644 --- a/shared/test/unit_test/debugger/test_l0_debugger.cpp +++ b/shared/test/unit_test/debugger/test_l0_debugger.cpp @@ -29,7 +29,7 @@ using namespace NEO; TEST(Debugger, givenL0DebuggerWhenGettingL0DebuggerThenCorrectObjectIsReturned) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto hwInfo = *NEO::defaultHwInfo.get(); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); @@ -84,7 +84,7 @@ TEST(Debugger, givenL0DebuggerOFFWhenGettingStateSaveAreaHeaderThenValidSipTypeI TEST(Debugger, givenDebuggingEnabledInExecEnvWhenAllocatingIsaThenSingleBankIsUsed) { auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto hwInfo = *NEO::defaultHwInfo.get(); hwInfo.featureTable.flags.ftrLocalMemory = true; @@ -112,7 +112,7 @@ TEST(Debugger, givenTileAttachAndDebuggingEnabledInExecEnvWhenAllocatingIsaThenM auto executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto hwInfo = *NEO::defaultHwInfo.get(); hwInfo.featureTable.flags.ftrLocalMemory = true; @@ -144,7 +144,7 @@ TEST(Debugger, WhenInitializingDebuggerL0ThenCapabilitiesAreAdjustedAndDebuggerI executionEnvironment->rootDeviceEnvironments[0]->initGmm(); executionEnvironment->initializeMemoryManager(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto neoDevice = std::unique_ptr(MockDevice::create(executionEnvironment, 0u)); @@ -266,16 +266,16 @@ HWTEST_F(L0DebuggerTest, givenUseBindlessDebugSipZeroWhenModuleHeapDebugAreaIsCr HWTEST_F(L0DebuggerTest, givenProgramDebuggingWhenGettingDebuggingModeThenCorrectModeIsReturned) { DebuggingMode mode = NEO::getDebuggingMode(0); - EXPECT_TRUE(DebuggingMode::Disabled == mode); + EXPECT_TRUE(DebuggingMode::disabled == mode); mode = NEO::getDebuggingMode(1); - EXPECT_TRUE(DebuggingMode::Online == mode); + EXPECT_TRUE(DebuggingMode::online == mode); mode = NEO::getDebuggingMode(2); - EXPECT_TRUE(DebuggingMode::Offline == mode); + EXPECT_TRUE(DebuggingMode::offline == mode); mode = NEO::getDebuggingMode(3); - EXPECT_TRUE(DebuggingMode::Disabled == mode); + EXPECT_TRUE(DebuggingMode::disabled == mode); } using PerContextAddressSpaceL0DebuggerTest = L0DebuggerTest; diff --git a/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp index 4749da084c..8501d7bb85 100644 --- a/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp @@ -35,7 +35,7 @@ GEN12LPTEST_F(CommandEncoderTest, WhenAdjustComputeModeIsCalledThenStateComputeM CommandContainer cmdContainer; auto ret = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - ASSERT_EQ(CommandContainer::ErrorCode::SUCCESS, ret); + ASSERT_EQ(CommandContainer::ErrorCode::success, ret); auto usedSpaceBefore = cmdContainer.getCommandStream()->getUsed(); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment(); @@ -87,7 +87,7 @@ GEN12LPTEST_F(CommandEncodeStatesTest, givenVariousEngineTypesWhenEncodeSbaThenA CommandContainer cmdContainer; auto ret = cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - ASSERT_EQ(CommandContainer::ErrorCode::SUCCESS, ret); + ASSERT_EQ(CommandContainer::ErrorCode::success, ret); auto gmmHelper = cmdContainer.getDevice()->getRootDeviceEnvironment().getGmmHelper(); uint32_t statelessMocsIndex = (gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) >> 1); diff --git a/shared/test/unit_test/helpers/kernel_helpers_tests.cpp b/shared/test/unit_test/helpers/kernel_helpers_tests.cpp index a7490994a9..14b6360c62 100644 --- a/shared/test/unit_test/helpers/kernel_helpers_tests.cpp +++ b/shared/test/unit_test/helpers/kernel_helpers_tests.cpp @@ -89,7 +89,7 @@ TEST_F(KernelHelperTest, GivenStatelessPrivateSizeGreaterThanGlobalSizeWhenCheck auto globalSize = pDevice->getDeviceInfo().globalMemSize; KernelDescriptor::KernelAttributes attributes = {}; attributes.perHwThreadPrivateMemorySize = (static_cast((globalSize + pDevice->getDeviceInfo().computeUnitsUsedForScratch) / pDevice->getDeviceInfo().computeUnitsUsedForScratch)) + 100; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::outOfDeviceMemory); } TEST_F(KernelHelperTest, GivenScratchSizeGreaterThanGlobalSizeWhenCheckingIfThereIsEnaughSpaceThenOutOfMemReturned) { @@ -98,9 +98,9 @@ TEST_F(KernelHelperTest, GivenScratchSizeGreaterThanGlobalSizeWhenCheckingIfTher attributes.perThreadScratchSize[0] = (static_cast((globalSize + pDevice->getDeviceInfo().computeUnitsUsedForScratch) / pDevice->getDeviceInfo().computeUnitsUsedForScratch)) + 100; auto &gfxCoreHelper = pDevice->getGfxCoreHelper(); if (attributes.perThreadScratchSize[0] > gfxCoreHelper.getMaxScratchSize()) { - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::INVALID_KERNEL); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::invalidKernel); } else { - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::outOfDeviceMemory); } } @@ -110,9 +110,9 @@ TEST_F(KernelHelperTest, GivenScratchPrivateSizeGreaterThanGlobalSizeWhenCheckin attributes.perThreadScratchSize[1] = (static_cast((globalSize + pDevice->getDeviceInfo().computeUnitsUsedForScratch) / pDevice->getDeviceInfo().computeUnitsUsedForScratch)) + 100; auto &gfxCoreHelper = pDevice->getGfxCoreHelper(); if (attributes.perThreadScratchSize[1] > gfxCoreHelper.getMaxScratchSize()) { - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::INVALID_KERNEL); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::invalidKernel); } else { - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::outOfDeviceMemory); } } @@ -125,7 +125,7 @@ TEST_F(KernelHelperTest, GivenScratchAndPrivateSizeLessThanGlobalSizeWhenCheckin uint32_t maxScratchSize = gfxCoreHelper.getMaxScratchSize(); attributes.perThreadScratchSize[0] = (size > maxScratchSize) ? maxScratchSize : size; attributes.perThreadScratchSize[1] = (size > maxScratchSize) ? maxScratchSize : size; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::SUCCESS); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::success); } TEST_F(KernelHelperTest, GivenScratchSizeGreaterThanMaxScratchSizeWhenCheckingIfThereIsEnaughSpaceThenInvalidKernelIsReturned) { @@ -135,7 +135,7 @@ TEST_F(KernelHelperTest, GivenScratchSizeGreaterThanMaxScratchSizeWhenCheckingIf attributes.perHwThreadPrivateMemorySize = 0x10; attributes.perThreadScratchSize[0] = maxScratchSize + 1; attributes.perThreadScratchSize[1] = 0x10; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::INVALID_KERNEL); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::invalidKernel); } TEST_F(KernelHelperTest, GivenScratchPrivateSizeGreaterThanMaxScratchSizeWhenCheckingIfThereIsEnaughSpaceThenInvalidKernelIsReturned) { @@ -145,7 +145,7 @@ TEST_F(KernelHelperTest, GivenScratchPrivateSizeGreaterThanMaxScratchSizeWhenChe attributes.perHwThreadPrivateMemorySize = 0x10; attributes.perThreadScratchSize[0] = 0x10; attributes.perThreadScratchSize[1] = maxScratchSize + 1; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::INVALID_KERNEL); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::invalidKernel); } TEST_F(KernelHelperTest, GivenScratchAndEqualsZeroWhenCheckingIfThereIsEnaughSpaceThenSuccessIsReturned) { @@ -153,7 +153,7 @@ TEST_F(KernelHelperTest, GivenScratchAndEqualsZeroWhenCheckingIfThereIsEnaughSpa attributes.perHwThreadPrivateMemorySize = 0; attributes.perThreadScratchSize[0] = 0; attributes.perThreadScratchSize[1] = 0; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::SUCCESS); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::success); } TEST_F(KernelHelperTest, GivenScratchEqualsZeroAndPrivetGreaterThanZeroWhenCheckingIfThereIsEnaughSpaceThenSuccessIsReturned) { @@ -161,7 +161,7 @@ TEST_F(KernelHelperTest, GivenScratchEqualsZeroAndPrivetGreaterThanZeroWhenCheck attributes.perHwThreadPrivateMemorySize = 0x10; attributes.perThreadScratchSize[0] = 0; attributes.perThreadScratchSize[1] = 0; - EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::SUCCESS); + EXPECT_EQ(KernelHelper::checkIfThereIsSpaceForScratchOrPrivate(attributes, pDevice), KernelHelper::ErrorCode::success); } TEST_F(KernelHelperTest, GivenNoPtrByValueWhenCheckingIsAnyArgumentPtrByValueThenFalseIsReturned) { diff --git a/shared/test/unit_test/memory_manager/host_ptr_manager_tests.cpp b/shared/test/unit_test/memory_manager/host_ptr_manager_tests.cpp index 0a83652605..4bb6c7a080 100644 --- a/shared/test/unit_test/memory_manager/host_ptr_manager_tests.cpp +++ b/shared/test/unit_test/memory_manager/host_ptr_manager_tests.cpp @@ -32,9 +32,9 @@ TEST_F(HostPtrManagerTest, GivenAlignedPointerAndAlignedSizeWhenGettingAllocatio AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(1u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::NONE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::none); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); EXPECT_EQ(reqs.totalRequiredSize, size); @@ -54,9 +54,9 @@ TEST_F(HostPtrManagerTest, GivenAlignedPointerAndNotAlignedSizeWhenGettingAlloca AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(2u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::TRAILING); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::trailing); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); EXPECT_EQ(reqs.totalRequiredSize, alignUp(size, MemoryConstants::pageSize)); EXPECT_EQ(ptr, reqs.allocationFragments[0].allocationPtr); @@ -77,9 +77,9 @@ TEST_F(HostPtrManagerTest, GivenNotAlignedPointerAndNotAlignedSizeWhenGettingAll AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(3u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::LEADING); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::TRAILING); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::leading); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::trailing); auto leadingPtr = (void *)0x1000; auto middlePtr = (void *)0x2000; @@ -104,9 +104,9 @@ TEST_F(HostPtrManagerTest, GivenNotAlignedPointerAndNotAlignedSizeWithinOnePageW AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(1u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::LEADING); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::NONE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::leading); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::none); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); auto leadingPtr = (void *)0x1000; @@ -129,9 +129,9 @@ TEST_F(HostPtrManagerTest, GivenNotAlignedPointerAndNotAlignedSizeWithinTwoPages AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(2u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::LEADING); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::TRAILING); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::leading); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::trailing); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); auto leadingPtr = (void *)0x1000; auto trailingPtr = (void *)0x2000; @@ -155,9 +155,9 @@ TEST_F(HostPtrManagerTest, GivenAlignedPointerAndAlignedSizeOfOnePageWhenGetting AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(1u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::NONE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::none); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); auto middlePtr = (void *)0x1000; @@ -180,9 +180,9 @@ TEST_F(HostPtrManagerTest, GivenNotAlignedPointerAndSizeThatFitsToPageWhenGettin AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(2u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::LEADING); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::leading); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); auto leadingPtr = (void *)0x1000; auto middlePtr = (void *)0x2000; @@ -206,9 +206,9 @@ TEST_F(HostPtrManagerTest, GivenAlignedPointerAndPageSizeWhenGettingAllocationRe AllocationRequirements reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size); EXPECT_EQ(1u, reqs.requiredFragmentsCount); - EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::MIDDLE); - EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::NONE); - EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::NONE); + EXPECT_EQ(reqs.allocationFragments[0].fragmentPosition, FragmentPosition::middle); + EXPECT_EQ(reqs.allocationFragments[1].fragmentPosition, FragmentPosition::none); + EXPECT_EQ(reqs.allocationFragments[2].fragmentPosition, FragmentPosition::none); auto middlePtr = (void *)0x1000; @@ -893,11 +893,11 @@ TEST_F(HostPtrAllocationTest, whenOverlappedFragmentIsBiggerThenStoredAndStoredF requirements.allocationFragments[0].allocationPtr = alignDown(cpuPtr1, MemoryConstants::pageSize); requirements.allocationFragments[0].allocationSize = MemoryConstants::pageSize * 10; - requirements.allocationFragments[0].fragmentPosition = FragmentPosition::NONE; + requirements.allocationFragments[0].fragmentPosition = FragmentPosition::none; RequirementsStatus status = hostPtrManager->checkAllocationsForOverlapping(*memoryManager, &requirements); - EXPECT_EQ(RequirementsStatus::SUCCESS, status); + EXPECT_EQ(RequirementsStatus::success, status); } HWTEST_F(HostPtrAllocationTest, givenOverlappingFragmentsWhenCheckIsCalledThenWaitAndCleanOnAllEngines) { @@ -941,7 +941,7 @@ HWTEST_F(HostPtrAllocationTest, givenOverlappingFragmentsWhenCheckIsCalledThenWa requirements.allocationFragments[0].allocationPtr = alignDown(cpuPtr, MemoryConstants::pageSize); requirements.allocationFragments[0].allocationSize = MemoryConstants::pageSize * 10; - requirements.allocationFragments[0].fragmentPosition = FragmentPosition::NONE; + requirements.allocationFragments[0].fragmentPosition = FragmentPosition::none; requirements.rootDeviceIndex = csr0->getRootDeviceIndex(); hostPtrManager->checkAllocationsForOverlapping(*memoryManager, &requirements); @@ -984,12 +984,12 @@ TEST_F(HostPtrAllocationTest, whenOverlappedFragmentIsBiggerThenStoredAndStoredF requirements.allocationFragments[0].allocationPtr = alignDown(cpuPtr1, MemoryConstants::pageSize); requirements.allocationFragments[0].allocationSize = MemoryConstants::pageSize * 10; - requirements.allocationFragments[0].fragmentPosition = FragmentPosition::NONE; + requirements.allocationFragments[0].fragmentPosition = FragmentPosition::none; requirements.rootDeviceIndex = csr->getRootDeviceIndex(); RequirementsStatus status = hostPtrManager->checkAllocationsForOverlapping(*memoryManager, &requirements); - EXPECT_EQ(RequirementsStatus::FATAL, status); + EXPECT_EQ(RequirementsStatus::fatal, status); } TEST_F(HostPtrAllocationTest, GivenAllocationsWithoutBiggerOverlapWhenChckingForOverlappingThenSuccessIsReturned) { @@ -1023,15 +1023,15 @@ TEST_F(HostPtrAllocationTest, GivenAllocationsWithoutBiggerOverlapWhenChckingFor requirements.allocationFragments[0].allocationPtr = alignDown(cpuPtr1, MemoryConstants::pageSize); requirements.allocationFragments[0].allocationSize = MemoryConstants::pageSize; - requirements.allocationFragments[0].fragmentPosition = FragmentPosition::LEADING; + requirements.allocationFragments[0].fragmentPosition = FragmentPosition::leading; requirements.allocationFragments[1].allocationPtr = alignUp(cpuPtr1, MemoryConstants::pageSize); requirements.allocationFragments[1].allocationSize = MemoryConstants::pageSize; - requirements.allocationFragments[1].fragmentPosition = FragmentPosition::TRAILING; + requirements.allocationFragments[1].fragmentPosition = FragmentPosition::trailing; RequirementsStatus status = hostPtrManager->checkAllocationsForOverlapping(*memoryManager, &requirements); - EXPECT_EQ(RequirementsStatus::SUCCESS, status); + EXPECT_EQ(RequirementsStatus::success, status); memoryManager->freeGraphicsMemory(graphicsAllocation1); memoryManager->freeGraphicsMemory(graphicsAllocation2); @@ -1067,11 +1067,11 @@ TEST_F(HostPtrAllocationTest, GivenAllocationsWithBiggerOverlapWhenChckingForOve requirements.allocationFragments[0].allocationPtr = alignDown(cpuPtr1, MemoryConstants::pageSize); requirements.allocationFragments[0].allocationSize = MemoryConstants::pageSize * 10; - requirements.allocationFragments[0].fragmentPosition = FragmentPosition::NONE; + requirements.allocationFragments[0].fragmentPosition = FragmentPosition::none; RequirementsStatus status = hostPtrManager->checkAllocationsForOverlapping(*memoryManager, &requirements); - EXPECT_EQ(RequirementsStatus::SUCCESS, status); + EXPECT_EQ(RequirementsStatus::success, status); } TEST(HostPtrEntryKeyTest, givenTwoHostPtrEntryKeysWhenComparingThemThenKeyWithLowerRootDeviceIndexIsLower) { 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 7cbe8e5fe0..b556e59a16 100644 --- a/shared/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/shared/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -71,7 +71,7 @@ TEST(MemoryManagerTest, whenGettingPreferredAllocationMethodThenNotDefinedIsRetu MockMemoryManager memoryManager; for (auto i = 0; i < static_cast(AllocationType::count); i++) { AllocationProperties allocationProperties{0u, 0u, static_cast(i), {}}; - EXPECT_EQ(GfxMemoryAllocationMethod::NotDefined, memoryManager.getPreferredAllocationMethod(allocationProperties)); + EXPECT_EQ(GfxMemoryAllocationMethod::notDefined, memoryManager.getPreferredAllocationMethod(allocationProperties)); } } diff --git a/shared/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp index 18ac4bbbe2..324b012254 100644 --- a/shared/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp @@ -370,14 +370,14 @@ TEST_F(DrmBufferObjectTest, givenDeleterWhenBufferObjectIsCreatedAndDeletedThenC TEST(DrmBufferObject, givenOfflineDebuggingModeWhenQueryingIsPerContextVMRequiredThenPerContextVMIsDisabled) { auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - device->getRootDeviceEnvironment().executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Offline); + device->getRootDeviceEnvironment().executionEnvironment.setDebuggingMode(NEO::DebuggingMode::offline); DrmMock drm(*(device->getExecutionEnvironment()->rootDeviceEnvironments[0].get())); EXPECT_FALSE(drm.isPerContextVMRequired()); } TEST(DrmBufferObject, givenPerContextVmRequiredWhenBoCreatedThenBindInfoIsInitializedToOsContextCount) { auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - device->getRootDeviceEnvironment().executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + device->getRootDeviceEnvironment().executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); device->getExecutionEnvironment()->calculateMaxOsContextCount(); DrmMock drm(*(device->getExecutionEnvironment()->rootDeviceEnvironments[0].get())); EXPECT_TRUE(drm.isPerContextVMRequired()); @@ -395,7 +395,7 @@ TEST(DrmBufferObject, givenPerContextVmRequiredWhenBoCreatedThenBindInfoIsInitia TEST(DrmBufferObject, givenDrmIoctlReturnsErrorNotSupportedThenBufferObjectReturnsError) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -425,7 +425,7 @@ TEST(DrmBufferObject, givenDrmIoctlReturnsErrorNotSupportedThenBufferObjectRetur TEST(DrmBufferObject, givenPerContextVmRequiredWhenBoBoundAndUnboundThenCorrectBindInfoIsUpdated) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -469,7 +469,7 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindSucceedsThenPr debugManager.flags.PrintBOBindingResult.set(true); auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -527,7 +527,7 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindFailsThenPrint debugManager.flags.PrintBOBindingResult.set(true); auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -575,7 +575,7 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindFailsThenPrint TEST(DrmBufferObject, givenDrmWhenBindOperationFailsThenFenceValueNotGrow) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -607,7 +607,7 @@ TEST(DrmBufferObject, givenDrmWhenBindOperationFailsThenFenceValueNotGrow) { TEST(DrmBufferObject, givenDrmWhenBindOperationSucceedsThenFenceValueGrow) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -639,7 +639,7 @@ TEST(DrmBufferObject, givenDrmWhenBindOperationSucceedsThenFenceValueGrow) { TEST(DrmBufferObject, givenDrmWhenUnBindOperationFailsThenFenceValueNotGrow) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -671,7 +671,7 @@ TEST(DrmBufferObject, givenDrmWhenUnBindOperationFailsThenFenceValueNotGrow) { TEST(DrmBufferObject, givenDrmWhenUnBindOperationSucceedsThenFenceValueGrow) { auto executionEnvironment = new ExecutionEnvironment; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); diff --git a/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp index 53b2f232a3..9c40872793 100644 --- a/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp @@ -195,7 +195,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringElfResourceWithoutDataThenRegi TEST(DrmPrelimTest, givenContextDebugAvailableWhenCheckedForSupportThenTrueIsReturned) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -219,7 +219,7 @@ TEST(DrmPrelimTest, givenContextDebugAvailableWhenCheckedForSupportThenTrueIsRet TEST(DrmPrelimTest, givenContextDebugNotAvailableWhenCheckedForSupportThenTrueIsReturned) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -315,7 +315,7 @@ HWTEST_F(DrmDebugPrelimTest, givenAddedBindExtHandlesInBoWhenUnbindingThenExtens TEST(DrmPrelimTest, givenProgramDebuggingAndContextDebugAvailableAndCCSEnginesWhenCreatingContextThenDebugFlagSipParamIsSet) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -337,7 +337,7 @@ TEST(DrmPrelimTest, givenProgramDebuggingAndContextDebugAvailableAndCCSEnginesWh TEST(DrmPrelimTest, givenProgramDebuggingAndContextDebugAvailableAndCCSEnginesWhenCreatingContextThenContextRunaloneIsSetOnlyIfCCSEnginesArePresent) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_manager_localmem_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_manager_localmem_prelim_tests.cpp index 04047132b6..e4e71c6cf1 100644 --- a/shared/test/unit_test/os_interface/linux/drm_memory_manager_localmem_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_manager_localmem_prelim_tests.cpp @@ -507,7 +507,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, mock->chunkingMode = 0x01; - executionEnvironment->setDebuggingMode(DebuggingMode::Online); + executionEnvironment->setDebuggingMode(DebuggingMode::online); AllocationProperties gpuProperties{0u, mock->minimalChunkingSize * 2, diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 8245d47450..c8f196ffc1 100644 --- a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -5781,7 +5781,7 @@ TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, allocData.rootDeviceIndex = rootDeviceIndex; allocData.storageInfo.memoryBanks = 0b11; - executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(DebuggingMode::offline); auto allocation = memoryManager->allocateGraphicsMemoryInDevicePool(allocData, status); EXPECT_NE(nullptr, allocation); diff --git a/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp index 65548c8525..35645c75a5 100644 --- a/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp @@ -312,7 +312,7 @@ TEST(DrmBufferObjectTestPrelim, givenDebuggingEnabledWithoutDisableScratchPagesF auto executionEnvironment = std::make_unique(); DrmQueryMock drm{*executionEnvironment->rootDeviceEnvironments[0]}; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); uint32_t vmId = 0; drm.createDrmVirtualMemory(vmId); @@ -327,7 +327,7 @@ TEST(DrmBufferObjectTestPrelim, givenDisableScratchPagesAndDebuggingEnabledWhenC auto executionEnvironment = std::make_unique(); DrmQueryMock drm{*executionEnvironment->rootDeviceEnvironments[0]}; - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); uint32_t vmId = 0; drm.createDrmVirtualMemory(vmId); diff --git a/shared/test/unit_test/os_interface/linux/drm_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_tests.cpp index f257de7106..a1efa987b9 100644 --- a/shared/test/unit_test/os_interface/linux/drm_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_tests.cpp @@ -673,7 +673,7 @@ TEST(DrmTest, givenDrmWhenCreatingOsContextThenCreateDrmContextWithVmId) { TEST(DrmTest, givenDrmWithPerContextVMRequiredWhenCreatingOsContextsThenImplicitVmIdPerContextIsUsed) { MockExecutionEnvironment executionEnvironment{}; auto &rootEnv = *executionEnvironment.rootDeviceEnvironments[0]; - rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); DrmMock drmMock(rootEnv); EXPECT_TRUE(drmMock.requirePerContextVM); @@ -688,7 +688,7 @@ TEST(DrmTest, givenDrmWithPerContextVMRequiredWhenCreatingOsContextsThenImplicit TEST(DrmTest, givenPerContextVMRequiredWhenCreatingOsContextsThenExplicitVmIsCreated) { MockExecutionEnvironment executionEnvironment{}; auto &rootEnv = *executionEnvironment.rootDeviceEnvironments[0]; - rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); DrmMock drmMock(rootEnv); EXPECT_TRUE(drmMock.requirePerContextVM); @@ -730,7 +730,7 @@ TEST(DrmTest, givenPerContextVMRequiredWhenVmIdCreationFailsThenContextInitializ TEST(DrmTest, givenPerContextVMRequiredWhenCreatingOsContextForSubDeviceThenVmIdPerContextIsCreateddAndStoredAtSubDeviceIndex) { MockExecutionEnvironment executionEnvironment{}; auto &rootEnv = *executionEnvironment.rootDeviceEnvironments[0]; - rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); DrmMock drmMock(rootEnv); EXPECT_TRUE(drmMock.requirePerContextVM); @@ -754,7 +754,7 @@ TEST(DrmTest, givenPerContextVMRequiredWhenCreatingOsContextForSubDeviceThenVmId TEST(DrmTest, givenPerContextVMRequiredWhenCreatingOsContextsForRootDeviceThenVmIdsPerContextAreCreatedAndStoredAtSubDeviceIndices) { MockExecutionEnvironment executionEnvironment{}; auto &rootEnv = *executionEnvironment.rootDeviceEnvironments[0]; - rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::Online); + rootEnv.executionEnvironment.setDebuggingMode(NEO::DebuggingMode::online); DrmMock drmMock(rootEnv); EXPECT_TRUE(drmMock.requirePerContextVM); @@ -795,7 +795,7 @@ TEST(DrmTest, givenNoPerContextVmsDrmWhenCreatingOsContextsThenVmIdIsNotQueriedA TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextThenSetContextDebugFlagIsCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -815,7 +815,7 @@ TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextTh TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextForInternalEngineThenSetContextDebugFlagIsNotCalled) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -851,7 +851,7 @@ TEST(DrmTest, givenNotEnabledDebuggingOrContextDebugUnsupportedWhenCreatingConte EXPECT_FALSE(drmMock.capturedCooperativeContextRequest); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); drmMock.contextDebugSupported = false; drmMock.callBaseCreateDrmContext = false; drmMock.capturedCooperativeContextRequest = true; @@ -929,7 +929,7 @@ TEST(DrmTest, givenPrintIoctlDebugFlagSetWhenGettingOATimestampFrequencyThenCapt TEST(DrmTest, givenProgramDebuggingWhenCreatingContextThenUnrecoverableContextIsSet) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); diff --git a/shared/test/unit_test/os_interface/linux/drm_with_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_with_prelim_tests.cpp index cd5d259b5a..2176735a4b 100644 --- a/shared/test/unit_test/os_interface/linux/drm_with_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_with_prelim_tests.cpp @@ -779,7 +779,7 @@ TEST_F(IoctlHelperPrelimFixture, whenCreateDrmContextIsCalledThenIoctlIsCalledOn } TEST_F(IoctlHelperPrelimFixture, givenProgramDebuggingAndContextDebugSupportedWhenCreatingContextThenCooperativeFlagIsPassedToCreateDrmContextOnlyIfCCSEnginesArePresent) { - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); drm->contextDebugSupported = true; drm->callBaseCreateDrmContext = false; @@ -802,7 +802,7 @@ TEST_F(IoctlHelperPrelimFixture, givenProgramDebuggingAndContextDebugSupportedWh } TEST_F(IoctlHelperPrelimFixture, givenProgramDebuggingModeAndContextDebugSupportedAndRegularEngineUsageWhenCreatingContextThenCooperativeFlagIsNotPassedInOfflineDebuggingMode) { - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); drm->contextDebugSupported = true; drm->callBaseCreateDrmContext = false; @@ -817,7 +817,7 @@ TEST_F(IoctlHelperPrelimFixture, givenProgramDebuggingModeAndContextDebugSupport EXPECT_FALSE(drm->capturedCooperativeContextRequest); } - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Offline); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::offline); OsContextLinux osContext2(*drm, 0, 5u, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular})); osContext2.ensureContextInitialized(); @@ -834,7 +834,7 @@ TEST_F(IoctlHelperPrelimFixture, givenProgramDebuggingModeAndContextDebugSupport TEST(IoctlHelperPrelimTest, givenProgramDebuggingAndContextDebugSupportedWhenInitializingContextThenVmIsCreatedWithAllNecessaryFlags) { auto executionEnvironment = std::make_unique(); - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); auto drm = std::make_unique(*executionEnvironment->rootDeviceEnvironments[0]); drm->ioctlHelper = std::make_unique(*drm); diff --git a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp index 1e57b4f370..443ca51f20 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp @@ -117,7 +117,7 @@ TEST_F(WddmMemoryManagerTests, GivenAllocDataWithSVMCPUSetWhenAllocateGraphicsMe allocData.allocationMethod = memoryManager->getPreferredAllocationMethod(allocationProperties); memoryManager->allocateGraphicsMemoryWithAlignment(allocData); - if (allocData.allocationMethod == GfxMemoryAllocationMethod::AllocateByKmd) { + if (allocData.allocationMethod == GfxMemoryAllocationMethod::allocateByKmd) { EXPECT_TRUE(memoryManager->allocateGraphicsMemoryUsingKmdAndMapItToCpuVACalled); } else { EXPECT_TRUE(memoryManager->allocateSystemMemoryAndCreateGraphicsAllocationFromItCalled); @@ -312,7 +312,7 @@ TEST_F(WddmMemoryManagerAllocPathTests, givenAllocateGraphicsMemoryUsingKmdAndMa allocData.allocationMethod = memoryManager->getPreferredAllocationMethod(allocationProperties); auto graphicsAllocation = memoryManager->allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(allocData, false); - if (allocData.allocationMethod == GfxMemoryAllocationMethod::AllocateByKmd && is64bit) { + if (allocData.allocationMethod == GfxMemoryAllocationMethod::allocateByKmd && is64bit) { EXPECT_FALSE(memoryManager->mapGpuVirtualAddressWithCpuPtr); } else { EXPECT_TRUE(memoryManager->mapGpuVirtualAddressWithCpuPtr); @@ -592,7 +592,7 @@ TEST_F(WddmMemoryManagerTests, givenForcePreferredAllocationMethodFlagSetWhenGet } DebugManagerStateRestore restorer; - for (const auto &allocationMethod : {GfxMemoryAllocationMethod::UseUmdSystemPtr, GfxMemoryAllocationMethod::AllocateByKmd}) { + for (const auto &allocationMethod : {GfxMemoryAllocationMethod::useUmdSystemPtr, GfxMemoryAllocationMethod::allocateByKmd}) { debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(allocationMethod)); EXPECT_EQ(allocationMethod, memoryManager->getPreferredAllocationMethod(allocationProperties)); } @@ -715,7 +715,7 @@ class WddmMemoryManagerSimpleTest : public ::testing::Test { TEST_F(WddmMemoryManagerSimpleTest, givenAllocateGraphicsMemoryWithPropertiesCalledWithDebugSurfaceTypeThenDebugSurfaceIsCreatedAndZerod) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); AllocationProperties debugSurfaceProperties{0, true, MemoryConstants::pageSize, AllocationType::debugContextSaveArea, false, false, 0b1011}; auto debugSurface = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(debugSurfaceProperties)); EXPECT_NE(nullptr, debugSurface); @@ -729,7 +729,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenAllocateGraphicsMemoryWithPropertiesCal TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWhenAllocateGraphicsMemoryIsCalledThenMemoryPoolIsSystem4KBPages) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); memoryManager.reset(new MockWddmMemoryManager(false, false, executionEnvironment)); if (memoryManager->isLimitedGPU(0)) { GTEST_SKIP(); @@ -829,7 +829,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenAllocationDataWithStorageInfoWhenAlloca TEST_F(WddmMemoryManagerSimpleTest, givenAllocationDataWithFlagsWhenAllocateGraphicsMemory64kbThenAllocationFlagFlushL3RequiredIsSetCorrectly) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); class MockGraphicsAllocation : public GraphicsAllocation { public: using GraphicsAllocation::allocationInfo; @@ -876,7 +876,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWhenAllocate32BitGraphicsM TEST_F(WddmMemoryManagerSimpleTest, givenMemoryManagerWith64KBPagesDisabledWhenAllocateGraphicsMemoryForSVMThen4KBGraphicsAllocationIsReturned) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); memoryManager.reset(new MockWddmMemoryManager(false, false, executionEnvironment)); if (memoryManager->isLimitedGPU(0)) { GTEST_SKIP(); @@ -1260,7 +1260,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenAllocationCreatedFromSharedHandleIsDestr } TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingLockedAllocationThatDoesntNeedMakeResidentBeforeLockThenDontEvictAllocationFromWddmTemporaryResources) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto allocation = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize})); memoryManager->lockResource(allocation); EXPECT_FALSE(allocation->needsMakeResidentBeforeLock); @@ -1269,7 +1269,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingLockedAllocationThatDoesntNeed } TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingNotLockedAllocationThatDoesntNeedMakeResidentBeforeLockThenDontEvictAllocationFromWddmTemporaryResources) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto allocation = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize})); EXPECT_FALSE(allocation->isLocked()); EXPECT_FALSE(allocation->needsMakeResidentBeforeLock); @@ -1278,7 +1278,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingNotLockedAllocationThatDoesntN } TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingLockedAllocationThatNeedsMakeResidentBeforeLockThenRemoveTemporaryResource) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto allocation = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize})); allocation->needsMakeResidentBeforeLock = true; memoryManager->lockResource(allocation); @@ -1287,7 +1287,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingLockedAllocationThatNeedsMakeR } TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingNotLockedAllocationThatNeedsMakeResidentBeforeLockThenDontEvictAllocationFromWddmTemporaryResources) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto allocation = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize})); allocation->needsMakeResidentBeforeLock = true; EXPECT_FALSE(allocation->isLocked()); @@ -1296,7 +1296,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingNotLockedAllocationThatNeedsMa } TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingAllocationWithReservedGpuVirtualAddressThenReleaseTheAddress) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto allocation = static_cast(memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize})); uint64_t gpuAddress = 0x123; uint64_t sizeForFree = 0x1234; @@ -1719,7 +1719,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenAlignmentRequirementExceedsPageSizeThenA allocData.size = 1024; allocData.alignment = MemoryConstants::pageSize; memoryManager.allocateGraphicsMemoryWithAlignment(allocData); - if (allocData.allocationMethod == GfxMemoryAllocationMethod::AllocateByKmd) { + if (allocData.allocationMethod == GfxMemoryAllocationMethod::allocateByKmd) { EXPECT_EQ(0, memoryManager.callCount.allocateSystemMemoryAndCreateGraphicsAllocationFromIt); EXPECT_EQ(1, memoryManager.callCount.allocateGraphicsMemoryUsingKmdAndMapItToCpuVA); } else { @@ -2304,7 +2304,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenLocalMemoryAllocationAndRequestedSizeIs HWTEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenCopyDebugSurfaceToMultiTileAllocationThenCallCopyMemoryToAllocation) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); size_t sourceAllocationSize = MemoryConstants::pageSize; std::vector dataToCopy(sourceAllocationSize, 1u); @@ -3138,7 +3138,7 @@ TEST_F(WddmMemoryManagerTest, givenNullPtrAndSizePassedToCreateInternalAllocatio GTEST_SKIP(); } DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto wddmAllocation = static_cast(memoryManager->allocate32BitGraphicsMemory(rootDeviceIndex, MemoryConstants::pageSize, nullptr, AllocationType::internalHeap)); ASSERT_NE(nullptr, wddmAllocation); auto gmmHelper = memoryManager->getGmmHelper(wddmAllocation->getRootDeviceIndex()); @@ -3162,7 +3162,7 @@ TEST_F(WddmMemoryManagerTest, givenPtrAndSizePassedToCreateInternalAllocationWhe GTEST_SKIP(); } DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); auto ptr = reinterpret_cast(0x1000000); auto wddmAllocation = static_cast(memoryManager->allocate32BitGraphicsMemory(rootDeviceIndex, MemoryConstants::pageSize, ptr, AllocationType::internalHeap)); ASSERT_NE(nullptr, wddmAllocation); @@ -3480,8 +3480,8 @@ TEST_F(MockWddmMemoryManagerTest, givenAllocateGraphicsMemoryForBufferAndRequest TEST_F(MockWddmMemoryManagerTest, givenDefaultMemoryManagerWhenItIsCreatedThenCorrectHugeGfxMemoryChunkIsSet) { MockWddmMemoryManager memoryManager(executionEnvironment); - EXPECT_EQ(memoryManager.getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::AllocateByKmd), 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k); - EXPECT_EQ(memoryManager.getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::UseUmdSystemPtr), 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k); + EXPECT_EQ(memoryManager.getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd), 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k); + EXPECT_EQ(memoryManager.getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::useUmdSystemPtr), 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k); } TEST_F(MockWddmMemoryManagerTest, givenAllocateGraphicsMemoryForHostBufferAndRequestedSizeIsHugeThenResultAllocationIsSplitted) { @@ -3982,7 +3982,7 @@ TEST(WddmMemoryManagerTest3, givenDefaultWddmMemoryManagerWhenItIsQueriedForInte TEST(WddmMemoryManagerTest3, givenUsedTagAllocationInWddmMemoryManagerWhenCleanupMemoryManagerThenDontAccessCsr) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); MockExecutionEnvironment executionEnvironment{}; auto csr = std::unique_ptr(createCommandStream(executionEnvironment, 0, 1)); auto wddm = new WddmMock(*executionEnvironment.rootDeviceEnvironments[0].get()); diff --git a/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp b/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp index 442e48f3f1..c37d55770c 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp @@ -65,7 +65,7 @@ TEST_F(WddmGlobalBindlessAllocatorTests, givenAllocateInFrontWindowPoolFlagWhenW auto gmmHelper = memManager->getGmmHelper(allocData.rootDeviceIndex); EXPECT_EQ(allocation->getGpuBaseAddress(), gmmHelper->canonize(allocation->getGpuAddress())); - if (allocData.allocationMethod == GfxMemoryAllocationMethod::AllocateByKmd) { + if (allocData.allocationMethod == GfxMemoryAllocationMethod::allocateByKmd) { EXPECT_TRUE(allocation->isAllocationLockable()); } else { EXPECT_FALSE(allocation->isAllocationLockable()); diff --git a/shared/test/unit_test/os_interface/windows/wddm_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_tests.cpp index 5a78031c5b..4bc4ad5641 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_tests.cpp @@ -95,7 +95,7 @@ TEST_F(WddmTests, whenftrEuDebugIsFalseThenDebuggingEnabledReturnsFalse) { } TEST_F(WddmTests, whenProgramDebugIsEnabledAndCreatingContextWithInternalEngineThenDebuggableContextReturnsFalse) { - executionEnvironment->setDebuggingMode(NEO::DebuggingMode::Online); + executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); wddm->init(); OsContextWin osContext(*wddm, 0, 5u, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::EngineType::ENGINE_RCS, EngineUsage::internal})); osContext.ensureContextInitialized(); diff --git a/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp b/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp index f1251921c2..5ad0111a25 100644 --- a/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp +++ b/shared/test/unit_test/preemption/test_preemption_xehp_and_later.cpp @@ -137,7 +137,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, GivenOfflineModeDebugg builtIns->callBaseGetSipKernel = true; executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(builtIns); executionEnvironment->rootDeviceEnvironments[0]->debugger.reset(new MockDebugger); - device->executionEnvironment->setDebuggingMode(DebuggingMode::Offline); + device->executionEnvironment->setDebuggingMode(DebuggingMode::offline); device->setPreemptionMode(MidThread); const uint32_t contextId = 0u; diff --git a/shared/test/unit_test/release_helper/release_helper_tests_base.cpp b/shared/test/unit_test/release_helper/release_helper_tests_base.cpp index 1ea9c79908..6ca94cf551 100644 --- a/shared/test/unit_test/release_helper/release_helper_tests_base.cpp +++ b/shared/test/unit_test/release_helper/release_helper_tests_base.cpp @@ -81,7 +81,7 @@ void ReleaseHelperTestsBase::whenCheckPreferredAllocationMethodThenAllocateByKmd EXPECT_FALSE(preferredAllocationMethod.has_value()); } else { EXPECT_TRUE(preferredAllocationMethod.has_value()); - EXPECT_EQ(GfxMemoryAllocationMethod::AllocateByKmd, preferredAllocationMethod.value()); + EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value()); } } } diff --git a/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp index c215545c7c..ad75aea53d 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/windows/wddm_memory_manager_tests_dg2.cpp @@ -22,7 +22,7 @@ using Dg2WddmTest = ::testing::Test; DG2TEST_F(Dg2WddmTest, givenG10A0WhenGettingLocalMemoryAccessModeThenCorrectValueIsReturned) { DebugManagerStateRestore restorer; - debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::UseUmdSystemPtr)); + debugManager.flags.ForcePreferredAllocationMethod.set(static_cast(GfxMemoryAllocationMethod::useUmdSystemPtr)); MockExecutionEnvironment executionEnvironment; RootDeviceEnvironment *rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get(); rootDeviceEnvironment->initGmm();