diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 841efe0e35..5b49dfe6b6 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -2059,7 +2059,7 @@ ze_result_t CommandListCoreFamily::appendWaitOnEvents(uint32_t nu NEO::EncodeBatchBufferStartOrEnd::programConditionalDataMemBatchBufferStart(*commandContainer.getCommandStream(), 0, gpuAddr, eventStateClear, NEO::CompareOperation::Equal, true); } else { - NEO::EncodeSempahore::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(), + NEO::EncodeSemaphore::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(), gpuAddr, eventStateClear, COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD); @@ -2819,7 +2819,7 @@ ze_result_t CommandListCoreFamily::appendWaitOnMemory(void *desc, commandContainer.addToResidencyContainer(srcAllocationStruct.alloc); uint64_t gpuAddress = static_cast(srcAllocationStruct.alignedAllocationPtr); - NEO::EncodeSempahore::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(), + NEO::EncodeSemaphore::addMiSemaphoreWaitCommand(*commandContainer.getCommandStream(), gpuAddress, data, comparator); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl index 45fc48b7fd..b0b9a12d57 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl @@ -46,7 +46,7 @@ void CommandListCoreFamilyImmediate::checkAvailableSpace(uint32_t } } - size_t semaphoreSize = NEO::EncodeSempahore::getSizeMiSemaphoreWait() * numEvents; + size_t semaphoreSize = NEO::EncodeSemaphore::getSizeMiSemaphoreWait() * numEvents; if (this->commandContainer.getCommandStream()->getAvailableSpace() < maxImmediateCommandSize + semaphoreSize) { bool requireSystemMemoryCommandBuffer = !hasRelaxedOrderingDependencies; diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index d5c90f705c..719dfda9e6 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -604,14 +604,14 @@ size_t CommandQueueHw::estimateLinearStreamSizeInitial( this->device->getNEODevice()->debugExecutionCounter.load(), NEO::PauseOnGpuProperties::PauseMode::BeforeWorkload)) { linearStreamSizeEstimate += NEO::MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(this->device->getNEODevice()->getRootDeviceEnvironment(), false); - linearStreamSizeEstimate += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + linearStreamSizeEstimate += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } if (NEO::PauseOnGpuProperties::pauseModeAllowed(NEO::DebugManager.flags.PauseOnEnqueue.get(), this->device->getNEODevice()->debugExecutionCounter.load(), NEO::PauseOnGpuProperties::PauseMode::AfterWorkload)) { linearStreamSizeEstimate += NEO::MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(this->device->getNEODevice()->getRootDeviceEnvironment(), false); - linearStreamSizeEstimate += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + linearStreamSizeEstimate += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } return linearStreamSizeEstimate; diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl index 5e3dfbdbd6..a343822776 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl @@ -140,7 +140,7 @@ void CommandQueueHw::patchCommands(CommandList &commandList, uint break; } case CommandList::CommandToPatch::PauseOnEnqueueSemaphoreStart: { - NEO::EncodeSempahore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), + NEO::EncodeSemaphore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), csr->getDebugPauseStateGPUAddress(), static_cast(NEO::DebugPauseState::hasUserStartConfirmation), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD, @@ -148,7 +148,7 @@ void CommandQueueHw::patchCommands(CommandList &commandList, uint break; } case CommandList::CommandToPatch::PauseOnEnqueueSemaphoreEnd: { - NEO::EncodeSempahore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), + NEO::EncodeSemaphore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), csr->getDebugPauseStateGPUAddress(), static_cast(NEO::DebugPauseState::hasUserEndConfirmation), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD, 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 ee02bc5167..b8a2f5e32f 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 @@ -199,7 +199,7 @@ void CommandQueueHw::patchCommands(CommandList &commandList, uint break; } case CommandList::CommandToPatch::PauseOnEnqueueSemaphoreStart: { - NEO::EncodeSempahore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), + NEO::EncodeSemaphore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), csr->getDebugPauseStateGPUAddress(), static_cast(NEO::DebugPauseState::hasUserStartConfirmation), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD, @@ -207,7 +207,7 @@ void CommandQueueHw::patchCommands(CommandList &commandList, uint break; } case CommandList::CommandToPatch::PauseOnEnqueueSemaphoreEnd: { - NEO::EncodeSempahore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), + NEO::EncodeSemaphore::programMiSemaphoreWait(reinterpret_cast(commandToPatch.pCommand), csr->getDebugPauseStateGPUAddress(), static_cast(NEO::DebugPauseState::hasUserEndConfirmation), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD, diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp index 0221650d2b..f4208b912d 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp @@ -705,7 +705,7 @@ HWTEST_F(CommandListCreate, givenAsyncCmdQueueAndImmediateCommandListWhenAppendW EXPECT_EQ(1u, commandList->getCmdListType()); EXPECT_NE(nullptr, whiteBoxCmdList->cmdQImmediate); - size_t expectedUsed = 2 * NEO::EncodeSempahore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_END); + size_t expectedUsed = 2 * NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_END); if (NEO::MemorySynchronizationCommands::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) { expectedUsed += sizeof(PIPE_CONTROL); } @@ -755,7 +755,7 @@ HWTEST_F(CommandListCreate, givenAsyncCmdQueueAndImmediateCommandListWhenAppendW EXPECT_EQ(1u, commandList->getCmdListType()); EXPECT_NE(nullptr, whiteBoxCmdList->cmdQImmediate); - size_t expectedUsed = 2 * NEO::EncodeSempahore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_END); + size_t expectedUsed = 2 * NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_END); expectedUsed = alignUp(expectedUsed, 64); auto &commandContainer = commandList->getCmdContainer(); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp index 7f97fc34d5..fa91436f51 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_7.cpp @@ -1918,7 +1918,7 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenThereIsNoEnoughSpaceFo auto whiteBoxCmdList = static_cast(commandList.get()); constexpr uint32_t numEvents = 100; - constexpr size_t eventWaitSize = numEvents * NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + constexpr size_t eventWaitSize = numEvents * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t useSize = commandList->getCmdContainer().getCommandStream()->getMaxAvailableSpace() - (maxImmediateCommandSize + eventWaitSize) + 1; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_barrier.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_barrier.cpp index 7ccf049d9a..fd1f41cd90 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_barrier.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_barrier.cpp @@ -124,7 +124,7 @@ void validateMultiTileBarrier(void *cmdBuffer, size_t &parsedOffset, EXPECT_EQ(gpuCrossTileSyncAddress, miSemaphore->getSemaphoreGraphicsAddress()); EXPECT_EQ(MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD, miSemaphore->getCompareOperation()); EXPECT_EQ(2u, miSemaphore->getSemaphoreDataDword()); - parsedOffset += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + parsedOffset += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } { auto bbStart = genCmdCast(ptrOffset(cmdBuffer, parsedOffset)); @@ -162,7 +162,7 @@ void validateMultiTileBarrier(void *cmdBuffer, size_t &parsedOffset, EXPECT_EQ(gpuFinalSyncAddress, miSemaphore->getSemaphoreGraphicsAddress()); EXPECT_EQ(MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD, miSemaphore->getCompareOperation()); EXPECT_EQ(2u, miSemaphore->getSemaphoreDataDword()); - parsedOffset += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + parsedOffset += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } { auto storeDataImm = genCmdCast(ptrOffset(cmdBuffer, parsedOffset)); @@ -186,7 +186,7 @@ void validateMultiTileBarrier(void *cmdBuffer, size_t &parsedOffset, EXPECT_EQ(gpuFinalSyncAddress, miSemaphore->getSemaphoreGraphicsAddress()); EXPECT_EQ(MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD, miSemaphore->getCompareOperation()); EXPECT_EQ(4u, miSemaphore->getSemaphoreDataDword()); - parsedOffset += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + parsedOffset += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } } } @@ -205,16 +205,16 @@ HWTEST2_F(MultiTileCommandListAppendBarrier, WhenAppendingBarrierThenPipeControl size_t beforeControlSectionOffset = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START); size_t startOffset = beforeControlSectionOffset + (2 * sizeof(uint32_t)); size_t expectedUseBuffer = startOffset + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); auto usedSpaceBefore = commandList->getCmdContainer().getCommandStream()->getUsed(); auto gpuBaseAddress = commandList->getCmdContainer().getCommandStream()->getGraphicsAllocation()->getGpuAddress() + @@ -261,16 +261,16 @@ HWTEST2_F(MultiTileCommandListAppendBarrier, size_t beforeControlSectionOffset = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START); size_t bbStartOffset = beforeControlSectionOffset + (2 * sizeof(uint32_t)); size_t expectedUseBuffer = bbStartOffset + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); auto firstBatchBufferAllocation = cmdListStream->getGraphicsAllocation(); auto useSize = cmdListStream->getAvailableSpace(); @@ -327,16 +327,16 @@ HWTEST2_F(MultiTileCommandListAppendBarrier, size_t beforeControlSectionOffset = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START); size_t bbStartOffset = beforeControlSectionOffset + (2 * sizeof(uint32_t)); size_t multiTileBarrierSize = bbStartOffset + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t postSyncSize = NEO::MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(device->getNEODevice()->getRootDeviceEnvironment(), false); @@ -433,16 +433,16 @@ HWTEST2_F(MultiTileCommandListAppendBarrier, size_t beforeControlSectionOffset = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START); size_t bbStartOffset = beforeControlSectionOffset + (2 * sizeof(uint32_t)); size_t multiTileBarrierSize = bbStartOffset + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t timestampRegisters = 2 * (sizeof(MI_LOAD_REGISTER_REG) + sizeof(MI_LOAD_REGISTER_IMM) + NEO::EncodeMath::streamCommandSize + sizeof(MI_STORE_REGISTER_MEM)); @@ -527,7 +527,7 @@ HWTEST2_F(MultiTileImmediateCommandListAppendBarrier, constexpr size_t sizeBarrierCommands = sizeof(PIPE_CONTROL) + sizeof(MI_ATOMIC) + - NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START); constexpr size_t expectedSize = sizeBarrierCommands + diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp index b62958ef76..c2dd806843 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp @@ -880,7 +880,7 @@ HWTEST2_F(MultiTileImmediateCommandListAppendLaunchKernelXeHpCoreTest, givenImpl auto sizeAfter = cmdStream->getUsed(); uint64_t bbStartGpuAddress = cmdStream->getGraphicsAllocation()->getGpuAddress() + sizeBefore; - bbStartGpuAddress += sizeof(WALKER_TYPE) + sizeof(PIPE_CONTROL) + sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + bbStartGpuAddress += sizeof(WALKER_TYPE) + sizeof(PIPE_CONTROL) + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + 3 * sizeof(uint32_t); GenCmdList cmdList; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp index 55add36e46..950f94dc66 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_wait_on_events.cpp @@ -530,7 +530,7 @@ HWTEST_F(CommandListAppendWaitOnEvent, givenCommandBufferIsEmptyWhenAppendingWai consumeSpace -= sizeof(MI_BATCH_BUFFER_END); commandList->getCmdContainer().getCommandStream()->getSpace(consumeSpace); - size_t expectedConsumedSpace = NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + size_t expectedConsumedSpace = NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); if (MemorySynchronizationCommands::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) { expectedConsumedSpace += sizeof(PIPE_CONTROL); } @@ -600,7 +600,7 @@ HWTEST2_F(MultTileCommandListAppendWaitOnEvent, GivenMultiTileCmdListWhenPartitionedEventUsedToWaitThenExpectProperGpuAddressAndSemaphoreCount, IsAtLeastXeHpCore) { using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; - size_t expectedSize = commandList->partitionCount * NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + size_t expectedSize = commandList->partitionCount * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); event->setPacketsInUse(commandList->partitionCount); event->setUsingContextEndOffset(true); diff --git a/opencl/source/command_queue/gpgpu_walker_base.inl b/opencl/source/command_queue/gpgpu_walker_base.inl index 73074d1636..153d403310 100644 --- a/opencl/source/command_queue/gpgpu_walker_base.inl +++ b/opencl/source/command_queue/gpgpu_walker_base.inl @@ -214,7 +214,7 @@ size_t EnqueueOperation::getTotalSizeRequiredCS(uint32_t eventType, c if (DebugManager.flags.PauseOnEnqueue.get() != -1) { expectedSizeCS += MemorySynchronizationCommands::getSizeForSingleBarrier(false) * 2; - expectedSizeCS += NEO::EncodeSempahore::getSizeMiSemaphoreWait() * 2; + expectedSizeCS += NEO::EncodeSemaphore::getSizeMiSemaphoreWait() * 2; } if (DebugManager.flags.GpuScratchRegWriteAfterWalker.get() != -1) { diff --git a/opencl/source/command_queue/hardware_interface_base.inl b/opencl/source/command_queue/hardware_interface_base.inl index 40f1c37696..17730a3ac2 100644 --- a/opencl/source/command_queue/hardware_interface_base.inl +++ b/opencl/source/command_queue/hardware_interface_base.inl @@ -286,7 +286,7 @@ inline void HardwareInterface::dispatchDebugPauseCommands( { using COMPARE_OPERATION = typename GfxFamily::MI_SEMAPHORE_WAIT::COMPARE_OPERATION; - EncodeSempahore::addMiSemaphoreWaitCommand(*commandStream, + EncodeSemaphore::addMiSemaphoreWaitCommand(*commandStream, address, static_cast(waitCondition), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD); diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp index ce3a24b309..1a1d2a95a1 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp @@ -124,7 +124,7 @@ HWTEST2_F(RangeBasedFlushTest, givenNoDcFlushInPipeControlWhenL3ControlFlushesCa if (MemorySynchronizationCommands::isBarrierWaRequired(device->getRootDeviceEnvironment())) { expectedCommands.push_back(new MatchHwCmd(1, Expects{EXPECT_MEMBER(PIPE_CONTROL, getDcFlushEnable, false)})); if (MemorySynchronizationCommands::getSizeForAdditonalSynchronization(device->getRootDeviceEnvironment()) > 0) { - expectedCommands.push_back(new MatchHwCmd(1, Expects{EXPECT_MEMBER(MI_SEMAPHORE_WAIT, getSemaphoreDataDword, EncodeSempahore::invalidHardwareTag)})); + expectedCommands.push_back(new MatchHwCmd(1, Expects{EXPECT_MEMBER(MI_SEMAPHORE_WAIT, getSemaphoreDataDword, EncodeSemaphore::invalidHardwareTag)})); } } expectedCommands.push_back(new MatchHwCmd(1, Expects{EXPECT_MEMBER(PIPE_CONTROL, getDcFlushEnable, false)})); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp index 75eab9a661..c638d776ed 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp @@ -367,7 +367,7 @@ HWTEST_F(CrossDeviceDependenciesTests, givenMultipleEventInMultiRootDeviceEnviro eventsRequest.fillCsrDependenciesForRootDevices(csrDeps, pCmdQ2->getGpgpuCommandStreamReceiver()); EXPECT_EQ(3u, csrDeps.multiRootTimeStampSyncContainer.size()); - EXPECT_EQ(3u * NEO::EncodeSempahore::getSizeMiSemaphoreWait(), TimestampPacketHelper::getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer(csrDeps)); + EXPECT_EQ(3u * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), TimestampPacketHelper::getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer(csrDeps)); } } diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index b2a1430dfc..4559a920a6 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -81,7 +81,7 @@ HWTEST_F(BcsTests, givenDebugCapabilityWhenEstimatingCommandSizeThenAddAllRequir cmdsSizePerBlit += EncodeMiFlushDW::getCommandSizeWithWa(waArgs); } - const size_t debugCommandsSize = (EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + EncodeSempahore::getSizeMiSemaphoreWait()) * 2; + const size_t debugCommandsSize = (EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + EncodeSemaphore::getSizeMiSemaphoreWait()) * 2; constexpr uint32_t numberOfBlts = 3; constexpr size_t bltSize = (numberOfBlts * max2DBlitSize); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_xehp_and_later.cpp index 0dea276b0d..ef6d1055f2 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_xehp_and_later.cpp @@ -914,7 +914,7 @@ HWTEST2_F(CommandStreamReceiverHwTestXeHPAndLater, givenStaticPartitionEnabledWh commandStreamReceiver.activePartitions = 2; size_t expectedSize = sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + 2 * sizeof(uint32_t); size_t estimatedCmdSize = commandStreamReceiver.getCmdSizeForStallingNoPostSyncCommands(); @@ -936,7 +936,7 @@ HWTEST2_F(CommandStreamReceiverHwTestXeHPAndLater, givenStaticPartitionEnabledWh MI_SEMAPHORE_WAIT *miSemaphore = genCmdCast(ptrOffset(cmdBuffer, offset)); ASSERT_NE(nullptr, miSemaphore); - offset += NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + offset += NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); MI_BATCH_BUFFER_START *bbStart = genCmdCast(ptrOffset(cmdBuffer, offset)); ASSERT_NE(nullptr, bbStart); @@ -1071,7 +1071,7 @@ HWTEST2_F(CommandStreamReceiverHwTestXeHPAndLater, givenStaticPartitionEnabledWh commandStreamReceiver->activePartitions = 2; size_t expectedSize = MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(rootDeviceEnvironment, false) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + 2 * sizeof(uint32_t); size_t estimatedCmdSize = commandStreamReceiver->getCmdSizeForStallingCommands(dispatchFlags); diff --git a/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp index cd2cf7881c..e3a10c90a4 100644 --- a/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp @@ -632,7 +632,7 @@ XE_HPC_CORETEST_F(GfxCoreHelperTestsXeHpcCore, givenDontProgramGlobalFenceAsMiMe DebugManagerStateRestore debugRestorer; DebugManager.flags.ProgramGlobalFenceAsMiMemFenceCommandInCommandStream.set(0); - EXPECT_EQ(NEO::EncodeSempahore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); + EXPECT_EQ(NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); } XE_HPC_CORETEST_F(GfxCoreHelperTestsXeHpcCore, givenProgramGlobalFenceAsMiMemFenceCommandInCommandStreamWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index f411ac91e6..439ac95d5a 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -361,7 +361,7 @@ struct EncodeComputeMode { }; template -struct EncodeSempahore { +struct EncodeSemaphore { using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT; using COMPARE_OPERATION = typename GfxFamily::MI_SEMAPHORE_WAIT::COMPARE_OPERATION; diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 3319c5f73b..fd3eac89c7 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -789,7 +789,7 @@ inline size_t EncodeIndirectParams::getCmdsSizeForSetWorkDimIndirect(con return requiredSize; } template -void EncodeSempahore::addMiSemaphoreWaitCommand(LinearStream &commandStream, +void EncodeSemaphore::addMiSemaphoreWaitCommand(LinearStream &commandStream, uint64_t compareAddress, uint32_t compareData, COMPARE_OPERATION compareMode) { @@ -797,7 +797,7 @@ void EncodeSempahore::addMiSemaphoreWaitCommand(LinearStream &commandStr } template -void EncodeSempahore::addMiSemaphoreWaitCommand(LinearStream &commandStream, +void EncodeSemaphore::addMiSemaphoreWaitCommand(LinearStream &commandStream, uint64_t compareAddress, uint32_t compareData, COMPARE_OPERATION compareMode, @@ -811,7 +811,7 @@ void EncodeSempahore::addMiSemaphoreWaitCommand(LinearStream &commandStr true); } template -void EncodeSempahore::applyMiSemaphoreWaitCommand(LinearStream &commandStream, std::list &commandsList) { +void EncodeSemaphore::applyMiSemaphoreWaitCommand(LinearStream &commandStream, std::list &commandsList) { MI_SEMAPHORE_WAIT *semaphoreCommand = commandStream.getSpaceForCmd(); commandsList.push_back(semaphoreCommand); } diff --git a/shared/source/command_container/command_encoder_bdw_and_later.inl b/shared/source/command_container/command_encoder_bdw_and_later.inl index cd5234e1bf..20d365e9e0 100644 --- a/shared/source/command_container/command_encoder_bdw_and_later.inl +++ b/shared/source/command_container/command_encoder_bdw_and_later.inl @@ -268,7 +268,7 @@ void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDis void *commandBuffer = listCmdBufferStream->getSpace(MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(args.device->getRootDeviceEnvironment(), false)); args.additionalCommands->push_back(commandBuffer); - EncodeSempahore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); + EncodeSemaphore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); } PreemptionHelper::applyPreemptionWaCmdsBegin(listCmdBufferStream, *args.device); @@ -288,7 +288,7 @@ void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDis void *commandBuffer = listCmdBufferStream->getSpace(MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(args.device->getRootDeviceEnvironment(), false)); args.additionalCommands->push_back(commandBuffer); - EncodeSempahore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); + EncodeSemaphore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); } } @@ -526,7 +526,7 @@ inline void EncodeSurfaceState::setCoherencyType(R_SURFACE_STATE *surfac } template -void EncodeSempahore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, +void EncodeSemaphore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, uint64_t compareAddress, uint32_t compareData, COMPARE_OPERATION compareMode, diff --git a/shared/source/command_container/command_encoder_xehp_and_later.inl b/shared/source/command_container/command_encoder_xehp_and_later.inl index ad7249d3e5..8340014c22 100644 --- a/shared/source/command_container/command_encoder_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_xehp_and_later.inl @@ -252,7 +252,7 @@ void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDis void *commandBuffer = listCmdBufferStream->getSpace(MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(args.device->getRootDeviceEnvironment(), false)); args.additionalCommands->push_back(commandBuffer); - EncodeSempahore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); + EncodeSemaphore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); } walkerCmd.setIndirectDataStartAddress(static_cast(offsetThreadData)); @@ -340,7 +340,7 @@ void EncodeDispatchKernel::encode(CommandContainer &container, EncodeDis void *commandBuffer = listCmdBufferStream->getSpace(MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(rootDeviceEnvironment, false)); args.additionalCommands->push_back(commandBuffer); - EncodeSempahore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); + EncodeSemaphore::applyMiSemaphoreWaitCommand(*listCmdBufferStream, *args.additionalCommands); } } @@ -702,7 +702,7 @@ inline void EncodeSurfaceState::setCoherencyType(R_SURFACE_STATE *surfac } template -void EncodeSempahore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, +void EncodeSemaphore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, uint64_t compareAddress, uint32_t compareData, COMPARE_OPERATION compareMode, diff --git a/shared/source/command_container/walker_partition_xehp_and_later.h b/shared/source/command_container/walker_partition_xehp_and_later.h index e12b7780dc..046482e3fd 100644 --- a/shared/source/command_container/walker_partition_xehp_and_later.h +++ b/shared/source/command_container/walker_partition_xehp_and_later.h @@ -219,7 +219,7 @@ void programRegisterWithValue(void *&inputAddress, uint32_t registerOffset, uint template void programWaitForSemaphore(void *&inputAddress, uint32_t &totalBytesProgrammed, uint64_t gpuAddress, uint32_t semaphoreCompareValue, typename MI_SEMAPHORE_WAIT::COMPARE_OPERATION compareOperation) { auto semaphoreWait = putCommand>(inputAddress, totalBytesProgrammed); - NEO::EncodeSempahore::programMiSemaphoreWait(semaphoreWait, gpuAddress, semaphoreCompareValue, compareOperation, false, true); + NEO::EncodeSemaphore::programMiSemaphoreWait(semaphoreWait, gpuAddress, semaphoreCompareValue, compareOperation, false, true); } template @@ -373,7 +373,7 @@ void programSelfCleanupSection(void *&inputAddress, template uint64_t computeTilesSynchronizationWithAtomicsSectionSize() { return sizeof(MI_ATOMIC) + - NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } template @@ -453,7 +453,7 @@ uint64_t computeControlSectionOffset(WalkerPartitionArgs &args) { size += sizeof(LOAD_REGISTER_REG); // id into register size += sizeof(MI_SET_PREDICATE) * 2 + sizeof(BATCH_BUFFER_START) * 2; - size += (args.semaphoreProgrammingRequired ? NEO::EncodeSempahore::getSizeMiSemaphoreWait() * args.partitionCount : 0u); + size += (args.semaphoreProgrammingRequired ? NEO::EncodeSemaphore::getSizeMiSemaphoreWait() * args.partitionCount : 0u); size += computeWalkerSectionSize(); size += args.emitPipeControlStall ? NEO::MemorySynchronizationCommands::getSizeForSingleBarrier(false) : 0u; if (args.crossTileAtomicSynchronization || args.emitSelfCleanup) { @@ -656,7 +656,7 @@ uint64_t computeStaticPartitioningControlSectionOffset(WalkerPartitionArgs &args ? computeTilesSynchronizationWithAtomicsSectionSize() : 0u; const auto afterExecutionSyncPostSyncSize = args.semaphoreProgrammingRequired - ? NEO::EncodeSempahore::getSizeMiSemaphoreWait() * args.partitionCount + ? NEO::EncodeSemaphore::getSizeMiSemaphoreWait() * args.partitionCount : 0u; const auto selfCleanupSectionSize = args.emitSelfCleanup ? computeSelfCleanupSectionSize(args.useAtomicsForSelfCleanup) diff --git a/shared/source/command_stream/experimental_command_buffer.inl b/shared/source/command_stream/experimental_command_buffer.inl index 1664df7c37..46857622e8 100644 --- a/shared/source/command_stream/experimental_command_buffer.inl +++ b/shared/source/command_stream/experimental_command_buffer.inl @@ -95,7 +95,7 @@ void ExperimentalCommandBuffer::addExperimentalCommands() { *semaphoreData = 1; uint64_t gpuAddr = experimentalAllocation->getGpuAddress() + experimentalAllocationOffset; - EncodeSempahore::programMiSemaphoreWait(currentStream->getSpaceForCmd(), + EncodeSemaphore::programMiSemaphoreWait(currentStream->getSpaceForCmd(), gpuAddr, *semaphoreData, MI_SEMAPHORE_WAIT::COMPARE_OPERATION_SAD_EQUAL_SDD, @@ -104,7 +104,7 @@ void ExperimentalCommandBuffer::addExperimentalCommands() { template size_t ExperimentalCommandBuffer::getExperimentalCommandsSize() noexcept { - return NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + return NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } } // namespace NEO diff --git a/shared/source/direct_submission/direct_submission_hw.inl b/shared/source/direct_submission/direct_submission_hw.inl index 76aec2fefa..dc21b1148f 100644 --- a/shared/source/direct_submission/direct_submission_hw.inl +++ b/shared/source/direct_submission/direct_submission_hw.inl @@ -287,7 +287,7 @@ void DirectSubmissionHw::dispatchRelaxedOrderingScheduler schedulerCmdStream.getSpace(EncodeMiPredicate::getCmdSize()); // skip patching - EncodeSempahore::addMiSemaphoreWaitCommand(schedulerCmdStream, semaphoreGpuVa, value, + EncodeSemaphore::addMiSemaphoreWaitCommand(schedulerCmdStream, semaphoreGpuVa, value, COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD); } @@ -571,7 +571,7 @@ inline void DirectSubmissionHw::dispatchSemaphoreSection( if (this->relaxedOrderingEnabled && this->relaxedOrderingSchedulerRequired) { dispatchRelaxedOrderingSchedulerSection(value); } else { - EncodeSempahore::addMiSemaphoreWaitCommand(ringCommandStream, + EncodeSemaphore::addMiSemaphoreWaitCommand(ringCommandStream, semaphoreGpuVa, value, COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD); @@ -588,7 +588,7 @@ inline void DirectSubmissionHw::dispatchSemaphoreSection( template inline size_t DirectSubmissionHw::getSizeSemaphoreSection(bool relaxedOrderingSchedulerRequired) { size_t semaphoreSize = (this->relaxedOrderingEnabled && relaxedOrderingSchedulerRequired) ? RelaxedOrderingHelper::DynamicSchedulerSizeAndOffsetSection::totalSize - : EncodeSempahore::getSizeMiSemaphoreWait(); + : EncodeSemaphore::getSizeMiSemaphoreWait(); semaphoreSize += getSizePrefetchMitigation(); if (isDisablePrefetcherRequired) { @@ -870,7 +870,7 @@ void DirectSubmissionHw::preinitializeRelaxedOrderingSect EncodeMiPredicate::encode(schedulerStream, MiPredicateType::Disable); - EncodeSempahore::addMiSemaphoreWaitCommand(schedulerStream, 0, 0, COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD); + EncodeSemaphore::addMiSemaphoreWaitCommand(schedulerStream, 0, 0, COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD); } // 4. End section diff --git a/shared/source/direct_submission/relaxed_ordering_helper.h b/shared/source/direct_submission/relaxed_ordering_helper.h index f042fea938..d22da209bf 100644 --- a/shared/source/direct_submission/relaxed_ordering_helper.h +++ b/shared/source/direct_submission/relaxed_ordering_helper.h @@ -92,7 +92,7 @@ struct DynamicSchedulerSizeAndOffsetSection { static constexpr uint64_t schedulerLoopCheckSectionSize = EncodeBatchBufferStartOrEnd::getCmdSizeConditionalDataMemBatchBufferStart() + sizeof(MI_BATCH_BUFFER_START); static constexpr uint64_t semaphoreSectionStart = schedulerLoopCheckSectionStart + schedulerLoopCheckSectionSize; - static constexpr uint64_t semaphoreSectionSize = EncodeSempahore::getSizeMiSemaphoreWait() + EncodeMiPredicate::getCmdSize(); + static constexpr uint64_t semaphoreSectionSize = EncodeSemaphore::getSizeMiSemaphoreWait() + EncodeMiPredicate::getCmdSize(); static constexpr uint64_t endSectionStart = semaphoreSectionStart + semaphoreSectionSize; static constexpr uint64_t endSectionSize = sizeof(MI_LOAD_REGISTER_IMM) + EncodeMiPredicate::getCmdSize(); diff --git a/shared/source/gen11/command_encoder_gen11.cpp b/shared/source/gen11/command_encoder_gen11.cpp index 23e2d8dd47..5b3d02b514 100644 --- a/shared/source/gen11/command_encoder_gen11.cpp +++ b/shared/source/gen11/command_encoder_gen11.cpp @@ -83,7 +83,7 @@ template struct EncodeStateBaseAddress; template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/gen12lp/command_encoder_gen12lp.cpp b/shared/source/gen12lp/command_encoder_gen12lp.cpp index 57dd068035..d42eca98ee 100644 --- a/shared/source/gen12lp/command_encoder_gen12lp.cpp +++ b/shared/source/gen12lp/command_encoder_gen12lp.cpp @@ -122,7 +122,7 @@ template struct EncodeStateBaseAddress; template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/gen8/command_encoder_gen8.cpp b/shared/source/gen8/command_encoder_gen8.cpp index 49c4049c4d..c447396752 100644 --- a/shared/source/gen8/command_encoder_gen8.cpp +++ b/shared/source/gen8/command_encoder_gen8.cpp @@ -64,7 +64,7 @@ template struct EncodeStateBaseAddress; template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/gen9/command_encoder_gen9.cpp b/shared/source/gen9/command_encoder_gen9.cpp index a872ed8780..825ea78b68 100644 --- a/shared/source/gen9/command_encoder_gen9.cpp +++ b/shared/source/gen9/command_encoder_gen9.cpp @@ -68,7 +68,7 @@ template struct EncodeStateBaseAddress; template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/helpers/blit_commands_helper_base.inl b/shared/source/helpers/blit_commands_helper_base.inl index cd5ebb3a66..2316b76c9f 100644 --- a/shared/source/helpers/blit_commands_helper_base.inl +++ b/shared/source/helpers/blit_commands_helper_base.inl @@ -333,13 +333,13 @@ void BlitCommandsHelper::dispatchDebugPauseCommands(LinearStream &com EncodeMiFlushDW::programWithWa(commandStream, debugPauseStateGPUAddress, static_cast(confirmationTrigger), args); - EncodeSempahore::addMiSemaphoreWaitCommand(commandStream, debugPauseStateGPUAddress, static_cast(waitCondition), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD); + EncodeSemaphore::addMiSemaphoreWaitCommand(commandStream, debugPauseStateGPUAddress, static_cast(waitCondition), COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD); } template size_t BlitCommandsHelper::getSizeForDebugPauseCommands(const RootDeviceEnvironment &rootDeviceEnvironment) { EncodeDummyBlitWaArgs waArgs{true, const_cast(&rootDeviceEnvironment)}; - return (EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + EncodeSempahore::getSizeMiSemaphoreWait()) * 2; + return (EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + EncodeSemaphore::getSizeMiSemaphoreWait()) * 2; } template diff --git a/shared/source/helpers/blit_commands_helper_xehp_and_later.inl b/shared/source/helpers/blit_commands_helper_xehp_and_later.inl index 36436c4719..eda2515439 100644 --- a/shared/source/helpers/blit_commands_helper_xehp_and_later.inl +++ b/shared/source/helpers/blit_commands_helper_xehp_and_later.inl @@ -368,7 +368,7 @@ void BlitCommandsHelper::programGlobalSequencerFlush(LinearStream &co using COMPARE_OPERATION = typename GfxFamily::MI_SEMAPHORE_WAIT::COMPARE_OPERATION; constexpr uint32_t globalInvalidationRegister = 0xB404u; LriHelper::program(&commandStream, globalInvalidationRegister, 1u, false); - EncodeSempahore::addMiSemaphoreWaitCommand(commandStream, + EncodeSemaphore::addMiSemaphoreWaitCommand(commandStream, globalInvalidationRegister, 0u, COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD, @@ -379,7 +379,7 @@ void BlitCommandsHelper::programGlobalSequencerFlush(LinearStream &co template size_t BlitCommandsHelper::getSizeForGlobalSequencerFlush() { if (DebugManager.flags.GlobalSequencerFlushOnCopyEngine.get() != 0) { - return sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + return sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } return 0u; } diff --git a/shared/source/helpers/timestamp_packet.h b/shared/source/helpers/timestamp_packet.h index 718f02cca2..caf4cbaf0d 100644 --- a/shared/source/helpers/timestamp_packet.h +++ b/shared/source/helpers/timestamp_packet.h @@ -100,7 +100,7 @@ struct TimestampPacketHelper { for (uint32_t packetId = 0; packetId < timestampPacketNode.getPacketsUsed(); packetId++) { uint64_t compareOffset = packetId * timestampPacketNode.getSinglePacketSize(); - EncodeSempahore::addMiSemaphoreWaitCommand(cmdStream, compareAddress + compareOffset, 1, COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD); + EncodeSemaphore::addMiSemaphoreWaitCommand(cmdStream, compareAddress + compareOffset, 1, COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD); } } @@ -160,12 +160,12 @@ struct TimestampPacketHelper { template static size_t getRequiredCmdStreamSizeForNodeDependencyWithBlitEnqueue() { - return NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + return NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } template static size_t getRequiredCmdStreamSizeForNodeDependency(TagNodeBase ×tampPacketNode) { - return (timestampPacketNode.getPacketsUsed() * NEO::EncodeSempahore::getSizeMiSemaphoreWait()); + return (timestampPacketNode.getPacketsUsed() * NEO::EncodeSemaphore::getSizeMiSemaphoreWait()); } template @@ -182,7 +182,7 @@ struct TimestampPacketHelper { template static size_t getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer(const CsrDependencies &csrDependencies) { - return csrDependencies.multiRootTimeStampSyncContainer.size() * NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + return csrDependencies.multiRootTimeStampSyncContainer.size() * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); } }; diff --git a/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp b/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp index 1a99c9a618..99f1528028 100644 --- a/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp @@ -90,7 +90,7 @@ template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeComputeMode; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp index b6cab0951f..9c7f5ea26e 100644 --- a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp @@ -314,7 +314,7 @@ template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeComputeMode; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp b/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp index 7eb008c3e0..c06a2358a4 100644 --- a/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/gfx_core_helper_xe_hpc_core.cpp @@ -167,7 +167,7 @@ size_t MemorySynchronizationCommands::getSizeForSingleAdditionalSynchron if (programGlobalFenceAsMiMemFenceCommandInCommandStream) { return sizeof(Family::MI_MEM_FENCE); } else { - return EncodeSempahore::getSizeMiSemaphoreWait(); + return EncodeSemaphore::getSizeMiSemaphoreWait(); } } @@ -192,13 +192,13 @@ void MemorySynchronizationCommands::setAdditionalSynchronization(void *& *reinterpret_cast(commandsBuffer) = miMemFence; commandsBuffer = ptrOffset(commandsBuffer, sizeof(MI_MEM_FENCE)); } else { - EncodeSempahore::programMiSemaphoreWait(reinterpret_cast(commandsBuffer), + EncodeSemaphore::programMiSemaphoreWait(reinterpret_cast(commandsBuffer), gpuAddress, - EncodeSempahore::invalidHardwareTag, + EncodeSemaphore::invalidHardwareTag, MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD, false, true); - commandsBuffer = ptrOffset(commandsBuffer, EncodeSempahore::getSizeMiSemaphoreWait()); + commandsBuffer = ptrOffset(commandsBuffer, EncodeSemaphore::getSizeMiSemaphoreWait()); } } diff --git a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp index ebed54c6b3..a4eaf66ce9 100644 --- a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp @@ -223,7 +223,7 @@ template struct EncodeStoreMMIO; template struct EncodeSurfaceState; template struct EncodeComputeMode; template struct EncodeAtomic; -template struct EncodeSempahore; +template struct EncodeSemaphore; template struct EncodeBatchBufferStartOrEnd; template struct EncodeMiFlushDW; template struct EncodeMiPredicate; diff --git a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp index c5f7f23722..fac0b43d40 100644 --- a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp @@ -83,14 +83,14 @@ bool GfxCoreHelperHw::isBankOverrideRequired(const HardwareInfo &hwInfo, template <> size_t MemorySynchronizationCommands::getSizeForSingleAdditionalSynchronizationForDirectSubmission(const RootDeviceEnvironment &rootDeviceEnvironment) { - return EncodeSempahore::getSizeMiSemaphoreWait(); + return EncodeSemaphore::getSizeMiSemaphoreWait(); } template <> void MemorySynchronizationCommands::addAdditionalSynchronizationForDirectSubmission(LinearStream &commandStream, uint64_t gpuAddress, bool acquire, const RootDeviceEnvironment &rootDeviceEnvironment) { using COMPARE_OPERATION = typename Family::MI_SEMAPHORE_WAIT::COMPARE_OPERATION; - EncodeSempahore::addMiSemaphoreWaitCommand(commandStream, gpuAddress, EncodeSempahore::invalidHardwareTag, COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD); + EncodeSemaphore::addMiSemaphoreWaitCommand(commandStream, gpuAddress, EncodeSemaphore::invalidHardwareTag, COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD); } template <> diff --git a/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl b/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl index ec75b69560..28fec2525a 100644 --- a/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl +++ b/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl @@ -59,7 +59,7 @@ uint32_t UnitTestHelper::getDefaultSshUsage() { template bool UnitTestHelper::isAdditionalMiSemaphoreWait(const typename GfxFamily::MI_SEMAPHORE_WAIT &semaphoreWait) { - return (semaphoreWait.getSemaphoreDataDword() == EncodeSempahore::invalidHardwareTag); + return (semaphoreWait.getSemaphoreDataDword() == EncodeSemaphore::invalidHardwareTag); } template diff --git a/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp b/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp index 53a35c42c3..6361419c78 100644 --- a/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp +++ b/shared/test/unit_test/direct_submission/direct_submission_tests_2.cpp @@ -2899,7 +2899,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenRelaxedOrderingSchedulerReq } EXPECT_EQ(expectedBaseSemaphoreSectionSize + RelaxedOrderingHelper::DynamicSchedulerSizeAndOffsetSection::totalSize, directSubmission.getSizeSemaphoreSection(true)); - EXPECT_EQ(expectedBaseSemaphoreSectionSize + EncodeSempahore::getSizeMiSemaphoreWait(), directSubmission.getSizeSemaphoreSection(false)); + EXPECT_EQ(expectedBaseSemaphoreSectionSize + EncodeSemaphore::getSizeMiSemaphoreWait(), directSubmission.getSizeSemaphoreSection(false)); size_t expectedBaseEndSize = Dispatcher::getSizeStopCommandBuffer() + Dispatcher::getSizeCacheFlush(directSubmission.rootDeviceEnvironment) + diff --git a/shared/test/unit_test/encoders/test_encode_semaphore.cpp b/shared/test/unit_test/encoders/test_encode_semaphore.cpp index b2ec185d76..9d14ddf884 100644 --- a/shared/test/unit_test/encoders/test_encode_semaphore.cpp +++ b/shared/test/unit_test/encoders/test_encode_semaphore.cpp @@ -19,7 +19,7 @@ HWTEST_F(CommandEncodeSemaphore, WhenProgrammingThenMiSemaphoreWaitIsUsed) { using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; MI_SEMAPHORE_WAIT miSemaphore1; - EncodeSempahore::programMiSemaphoreWait(&miSemaphore1, + EncodeSemaphore::programMiSemaphoreWait(&miSemaphore1, 0x123400, 4, MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD, @@ -32,7 +32,7 @@ HWTEST_F(CommandEncodeSemaphore, WhenProgrammingThenMiSemaphoreWaitIsUsed) { EXPECT_EQ(MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_POLLING_MODE, miSemaphore1.getWaitMode()); MI_SEMAPHORE_WAIT miSemaphore2; - EncodeSempahore::programMiSemaphoreWait(&miSemaphore2, + EncodeSemaphore::programMiSemaphoreWait(&miSemaphore2, 0x123400, 4, MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD, @@ -50,12 +50,12 @@ HWTEST_F(CommandEncodeSemaphore, whenAddingMiSemaphoreCommandThenExpectCompareFi LinearStream stream(buffer.get(), 128); COMPARE_OPERATION compareMode = COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD; - EncodeSempahore::addMiSemaphoreWaitCommand(stream, + EncodeSemaphore::addMiSemaphoreWaitCommand(stream, 0xFF00FF000u, 5u, compareMode); - EXPECT_EQ(NEO::EncodeSempahore::getSizeMiSemaphoreWait(), stream.getUsed()); + EXPECT_EQ(NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), stream.getUsed()); HardwareParse hwParse; hwParse.parseCommands(stream); @@ -70,7 +70,7 @@ HWTEST_F(CommandEncodeSemaphore, whenAddingMiSemaphoreCommandThenExpectCompareFi HWTEST_F(CommandEncodeSemaphore, whenGettingMiSemaphoreCommandSizeThenExpectSingleMiSemaphoreCommandSize) { using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; - size_t expectedSize = NEO::EncodeSempahore::getSizeMiSemaphoreWait(); - size_t actualSize = EncodeSempahore::getSizeMiSemaphoreWait(); + size_t expectedSize = NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); + size_t actualSize = EncodeSemaphore::getSizeMiSemaphoreWait(); EXPECT_EQ(expectedSize, actualSize); } diff --git a/shared/test/unit_test/encoders/test_implicit_scaling_xehp_and_later.cpp b/shared/test/unit_test/encoders/test_implicit_scaling_xehp_and_later.cpp index eb01da596e..f8ccbea77d 100644 --- a/shared/test/unit_test/encoders/test_implicit_scaling_xehp_and_later.cpp +++ b/shared/test/unit_test/encoders/test_implicit_scaling_xehp_and_later.cpp @@ -434,12 +434,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(WALKER_TYPE) + sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) * 2 + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -502,12 +502,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, sizeof(WALKER_TYPE) + sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) * 2 + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -689,12 +689,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(WALKER_TYPE) + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) * 2 + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -755,7 +755,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, walker.setThreadGroupIdXDimension(32); size_t expectedSize = sizeof(WALKER_TYPE) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection); @@ -820,7 +820,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_LOAD_REGISTER_MEM) + sizeof(WALKER_TYPE) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection); @@ -882,15 +882,15 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, WALKER_TYPE walker = FamilyType::cmdInitGpgpuWalker; walker.setThreadGroupIdXDimension(32); - size_t expectedSize = sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + size_t expectedSize = sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(WALKER_TYPE) + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) * 2 + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -952,12 +952,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(WALKER_TYPE) + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::StaticPartitioningControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) * 2 + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -1006,7 +1006,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START; size_t expectedSize = sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection); @@ -1056,12 +1056,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -1110,12 +1110,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_ATOMIC) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_ATOMIC) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); DebugManager.flags.UseAtomicsForSelfCleanupSection.set(1); @@ -1165,7 +1165,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, MockExecutionEnvironment mockExecutionEnvironment{}; size_t expectedSize = MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(pDevice->getRootDeviceEnvironment(), false) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection); @@ -1242,12 +1242,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_STORE_DATA_IMM) + MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(pDevice->getRootDeviceEnvironment(), false) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -1326,12 +1326,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_ATOMIC) + MemorySynchronizationCommands::getSizeForBarrierWithPostSyncOperation(pDevice->getRootDeviceEnvironment(), false) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_ATOMIC) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -1406,7 +1406,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, DebugManager.flags.ProgramWalkerPartitionSelfCleanup.set(0); size_t expectedSize = sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection); @@ -1460,12 +1460,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; @@ -1517,14 +1517,14 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, size_t expectedSize = sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_BATCH_BUFFER_START) + sizeof(WalkerPartition::BarrierControlSection) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait() + + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait() + sizeof(MI_STORE_DATA_IMM) + sizeof(PIPE_CONTROL) + - sizeof(MI_ATOMIC) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + sizeof(MI_ATOMIC) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); size_t estimatedSize = 0; size_t totalBytesProgrammed = 0; diff --git a/shared/test/unit_test/helpers/gfx_core_helper_tests_dg2_and_later.cpp b/shared/test/unit_test/helpers/gfx_core_helper_tests_dg2_and_later.cpp index 10293abc81..b4c7100ac5 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_tests_dg2_and_later.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_tests_dg2_and_later.cpp @@ -124,8 +124,8 @@ HWTEST2_F(PipeControlHelperTestsDg2AndLater, WhenAddingPipeControlWAThenCorrectC if (requiresMemorySynchronization) { if (UnitTestHelper::isAdditionalMiSemaphoreWaitRequired(rootDeviceEnvironment)) { MI_SEMAPHORE_WAIT expectedMiSemaphoreWait; - EncodeSempahore::programMiSemaphoreWait(&expectedMiSemaphoreWait, address, - EncodeSempahore::invalidHardwareTag, + EncodeSemaphore::programMiSemaphoreWait(&expectedMiSemaphoreWait, address, + EncodeSemaphore::invalidHardwareTag, MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD, false, true); diff --git a/shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp b/shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp index 529bd702d0..fdc6f04ad5 100644 --- a/shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp +++ b/shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp @@ -1114,7 +1114,7 @@ HWTEST2_F(BlitTests, givenEnabledGlobalCacheInvalidationWhenProgrammingGlobalSeq uint32_t streamBuffer[100] = {}; LinearStream stream(streamBuffer, sizeof(streamBuffer)); - size_t expectedSize = sizeof(MI_LOAD_REGISTER_IMM) + NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + size_t expectedSize = sizeof(MI_LOAD_REGISTER_IMM) + NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); auto val = BlitCommandsHelper::getSizeForGlobalSequencerFlush(); EXPECT_EQ(expectedSize, val); diff --git a/shared/test/unit_test/helpers/timestamp_packet_tests.cpp b/shared/test/unit_test/helpers/timestamp_packet_tests.cpp index aeb9cde1f9..614367762a 100644 --- a/shared/test/unit_test/helpers/timestamp_packet_tests.cpp +++ b/shared/test/unit_test/helpers/timestamp_packet_tests.cpp @@ -194,7 +194,7 @@ HWTEST_F(TimestampPacketTests, whenEstimatingSizeForNodeDependencyThenReturnCorr size_t sizeForNodeDependency = 0; sizeForNodeDependency += TimestampPacketHelper::getRequiredCmdStreamSizeForNodeDependency(mockNode); - size_t expectedSize = mockNode.getPacketsUsed() * NEO::EncodeSempahore::getSizeMiSemaphoreWait(); + size_t expectedSize = mockNode.getPacketsUsed() * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(); EXPECT_EQ(expectedSize, sizeForNodeDependency); } @@ -315,7 +315,7 @@ HWTEST_F(TimestampPacketHelperTests, givenTagNodesInMultiRootSyncContainerWhenPr container.add(mockTagAllocator->getTag()); deps.multiRootTimeStampSyncContainer.push_back(&container); TimestampPacketHelper::programCsrDependenciesForForMultiRootDeviceSyncContainer(cmdStream, deps); - EXPECT_EQ(cmdStream.getUsed(), NEO::EncodeSempahore::getSizeMiSemaphoreWait()); + EXPECT_EQ(cmdStream.getUsed(), NEO::EncodeSemaphore::getSizeMiSemaphoreWait()); } HWTEST_F(TimestampPacketHelperTests, givenEmptyContainerMultiRootSyncContainerWhenProgramingDependensiecThenZeroSemaforesAreProgrammed) { diff --git a/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp index 5be359bbdf..39271c0b1e 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp @@ -61,14 +61,14 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionEnumAndPlatformFamilyTypeThenPrope } PVCTEST_F(GfxCoreHelperTestsPvc, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { - EXPECT_EQ(NEO::EncodeSempahore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); + EXPECT_EQ(NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); } PVCTEST_F(GfxCoreHelperTestsPvc, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { DebugManagerStateRestore restorer; DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1); - EXPECT_EQ(2 * NEO::EncodeSempahore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); + EXPECT_EQ(2 * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); } PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionIdWhenGetComputeUnitsUsedForScratchThenReturnValidValue) { @@ -139,7 +139,7 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenMemorySynchronizationCommandsWhenAddingSyn EXPECT_EQ(1u, hwParser.cmdList.size()); if (testInput.expectMiSemaphoreWait) { - EXPECT_EQ(NEO::EncodeSempahore::getSizeMiSemaphoreWait(), synchronizationSize); + EXPECT_EQ(NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), synchronizationSize); auto semaphoreCmd = genCmdCast(*hwParser.cmdList.begin()); ASSERT_NE(nullptr, semaphoreCmd);