mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 00:58:39 +08:00
Revert "fix: state cache invalidation WA for xe3"
This reverts commit ebdf993a25.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
49020f234d
commit
cfb4182524
@@ -573,7 +573,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
|
||||
kernelWithAssertAppended = true;
|
||||
}
|
||||
|
||||
if (neoDevice->getReleaseHelper()->isStateCacheInvalidationWaRequired() || kernelImp->usesRayTracing()) {
|
||||
if (kernelImp->usesRayTracing()) {
|
||||
NEO::PipeControlArgs args{};
|
||||
args.stateCacheInvalidationEnable = true;
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandContainer.getCommandStream(), args);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "shared/source/helpers/definitions/command_encoder_args.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/mocks/mock_command_encoder.h"
|
||||
@@ -890,9 +889,6 @@ HWTEST_F(HostPointerManagerCommandListTest, givenCommandListWhenMemoryFillWithSi
|
||||
if (!l3FlushAfterPostSupported && NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
EXPECT_NE(nullptr, pc);
|
||||
EXPECT_TRUE(pc->getDcFlushEnable());
|
||||
} else if (device->getNEODevice()->getReleaseHelper()->isStateCacheInvalidationWaRequired()) {
|
||||
EXPECT_NE(nullptr, pc);
|
||||
EXPECT_TRUE(pc->getStateCacheInvalidationEnable());
|
||||
} else {
|
||||
EXPECT_EQ(nullptr, pc);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/helpers/state_base_address_helper.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/kernel/implicit_args_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
@@ -3429,12 +3428,7 @@ HWTEST2_F(CommandListStateBaseAddressPrivateHeapTest,
|
||||
NEO::EncodeMemoryPrefetch<FamilyType>::getSizeForMemoryPrefetch(kernel->getImmutableData()->getIsaSize(), device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
size_t barrierSize = 0;
|
||||
if (neoDevice->getReleaseHelper()->isStateCacheInvalidationWaRequired()) {
|
||||
barrierSize += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier();
|
||||
}
|
||||
|
||||
EXPECT_EQ(usedBefore + prefetchSize + barrierSize, cmdListStream.getUsed());
|
||||
EXPECT_EQ(usedBefore + prefetchSize, cmdListStream.getUsed());
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
|
||||
@@ -1780,52 +1780,5 @@ HWTEST2_F(CommandListAppendLaunchKernelMockModule,
|
||||
EXPECT_NE(eventAllocationIt, cmdlistResidency.end());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendLaunchKernelMockModule,
|
||||
givenStateCacheInvalidationWaIsRequiredWhenTwoKernelsAreAppendedThenPipeControlWithStateCacheInvalidationIsInsertedBetweenWalkers, IsAtLeastXeCore) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
using COMPUTE_WALKER = typename FamilyType::DefaultWalkerType;
|
||||
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
ze_result_t returnValue;
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
|
||||
auto usedSpaceBefore = commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
|
||||
returnValue = commandList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
|
||||
returnValue = commandList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
|
||||
auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
EXPECT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList,
|
||||
ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), usedSpaceBefore),
|
||||
usedSpaceAfter - usedSpaceBefore));
|
||||
|
||||
auto walkers = findAll<COMPUTE_WALKER *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_EQ(2u, walkers.size());
|
||||
|
||||
auto itorPC = findAll<PIPE_CONTROL *>(walkers[0], walkers[1]);
|
||||
|
||||
bool foundStateCacheInvalidation = false;
|
||||
for (auto it : itorPC) {
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*it);
|
||||
if (pcCmd->getStateCacheInvalidationEnable()) {
|
||||
foundStateCacheInvalidation = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (device->getNEODevice()->getReleaseHelper()->isStateCacheInvalidationWaRequired()) {
|
||||
EXPECT_TRUE(foundStateCacheInvalidation);
|
||||
} else {
|
||||
EXPECT_FALSE(foundStateCacheInvalidation);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
||||
@@ -4264,25 +4264,16 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenInOrderModeWhenProgrammin
|
||||
|
||||
ASSERT_NE(cmdList.end(), walkerItor);
|
||||
|
||||
auto pcItors = findAll<PIPE_CONTROL *>(walkerItor, cmdList.end());
|
||||
EXPECT_FALSE(pcItors.empty());
|
||||
auto pcItor = find<PIPE_CONTROL *>(walkerItor, cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), pcItor);
|
||||
|
||||
bool foundMatchingPipeControl = false;
|
||||
for (auto pcItor : pcItors) {
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItor);
|
||||
ASSERT_NE(nullptr, pcCmd);
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItor);
|
||||
ASSERT_NE(nullptr, pcCmd);
|
||||
EXPECT_EQ(immCmdList->getDcFlushRequired(true), pcCmd->getDcFlushEnable());
|
||||
EXPECT_TRUE(UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pcCmd));
|
||||
EXPECT_TRUE(pcCmd->getUnTypedDataPortCacheFlush());
|
||||
|
||||
if (pcCmd->getDcFlushEnable() == immCmdList->getDcFlushRequired(true) &&
|
||||
UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pcCmd) &&
|
||||
pcCmd->getUnTypedDataPortCacheFlush()) {
|
||||
foundMatchingPipeControl = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_TRUE(foundMatchingPipeControl);
|
||||
|
||||
auto sdiItor = find<MI_STORE_DATA_IMM *>(walkerItor, cmdList.end());
|
||||
auto sdiItor = find<MI_STORE_DATA_IMM *>(pcItor, cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), sdiItor);
|
||||
|
||||
auto sdiCmd = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||
@@ -6618,25 +6609,15 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenInOrderModeWhenProgrammin
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, cmdStream->getCpuBase(), cmdStream->getUsed()));
|
||||
|
||||
auto pcItors = findAll<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_FALSE(pcItors.empty());
|
||||
auto cmdItor = pcItors[0];
|
||||
auto cmdItor = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), cmdItor);
|
||||
|
||||
bool foundMatchingPipeControl = false;
|
||||
for (auto pcItor : pcItors) {
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItor);
|
||||
ASSERT_NE(nullptr, pcCmd);
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*cmdItor);
|
||||
ASSERT_NE(nullptr, pcCmd);
|
||||
|
||||
if (pcCmd->getDcFlushEnable() == immCmdList->getDcFlushRequired(true) &&
|
||||
UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pcCmd) &&
|
||||
pcCmd->getUnTypedDataPortCacheFlush()) {
|
||||
foundMatchingPipeControl = true;
|
||||
cmdItor = pcItor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_TRUE(foundMatchingPipeControl);
|
||||
EXPECT_EQ(immCmdList->getDcFlushRequired(true), pcCmd->getDcFlushEnable());
|
||||
EXPECT_TRUE(UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pcCmd));
|
||||
EXPECT_TRUE(pcCmd->getUnTypedDataPortCacheFlush());
|
||||
|
||||
auto sdiCmd = genCmdCast<MI_STORE_DATA_IMM *>(*(++cmdItor));
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/helpers/relaxed_ordering_commands_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_direct_submission_hw.h"
|
||||
@@ -4050,9 +4049,6 @@ HWTEST2_F(MultiTileInOrderCmdListTests, givenMultiTileInOrderModeWhenProgramming
|
||||
auto pcItors = findAll<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(pcItors.size(), 0u);
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItors.back());
|
||||
if (device->getNEODevice()->getReleaseHelper()->isStateCacheInvalidationWaRequired()) {
|
||||
pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItors.front());
|
||||
}
|
||||
|
||||
uint64_t address = pcCmd->getAddressHigh();
|
||||
address <<= 32;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/utilities/tag_allocator.h"
|
||||
|
||||
#include "opencl/source/command_queue/hardware_interface_base.inl"
|
||||
@@ -40,11 +39,6 @@ inline void HardwareInterface<GfxFamily>::dispatchWorkarounds(
|
||||
CommandQueue &commandQueue,
|
||||
Kernel &kernel,
|
||||
const bool &enable) {
|
||||
if (!enable && commandQueue.getDevice().getReleaseHelper()->isStateCacheInvalidationWaRequired()) {
|
||||
PipeControlArgs args{};
|
||||
args.stateCacheInvalidationEnable = true;
|
||||
MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandStream, args);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "shared/source/helpers/local_work_size.h"
|
||||
#include "shared/source/kernel/implicit_args_helper.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/utilities/hw_timestamps.h"
|
||||
#include "shared/source/utilities/tag_allocator.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
@@ -148,11 +147,6 @@ HWTEST_F(DispatchWalkerTest, WhenDispatchingWalkerThenCommandStreamMemoryIsntCha
|
||||
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::DefaultWalkerType) +
|
||||
HardwareCommandsHelper<FamilyType>::getSizeRequiredCS();
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
if (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired()) {
|
||||
sizeDispatchWalkerNeeds += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier();
|
||||
}
|
||||
|
||||
// cs has a minimum required size
|
||||
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
||||
|
||||
@@ -197,11 +191,6 @@ HWTEST_F(DispatchWalkerTest, GivenNoLocalIdsWhenDispatchingWalkerThenWalkerIsDis
|
||||
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::DefaultWalkerType) +
|
||||
HardwareCommandsHelper<FamilyType>::getSizeRequiredCS();
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
if (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired()) {
|
||||
sizeDispatchWalkerNeeds += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier();
|
||||
}
|
||||
|
||||
// cs has a minimum required size
|
||||
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue.h"
|
||||
#include "opencl/source/event/event.h"
|
||||
#include "opencl/test/unit_test/fixtures/hello_world_fixture.h"
|
||||
@@ -114,17 +112,15 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, TwoIOQsTwoDependentWalkers, GivenTwoCommandQueues
|
||||
EXPECT_EQ(1u, numCommands);
|
||||
}
|
||||
|
||||
HWTEST_F(TwoIOQsTwoDependentWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenAtLeastOnePipeControlIsInsertedBetweenWalkers) {
|
||||
HWTEST_F(TwoIOQsTwoDependentWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenOnePipeControlIsInsertedBetweenWalkers) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
parseWalkers<FamilyType>();
|
||||
auto itorCmd = find<PIPE_CONTROL *>(itorWalker1, itorWalker2);
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
const bool isStateCacheInvalidationWaRequired = releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired();
|
||||
const bool isUpdateTagFromWaitEnabled = pCmdQ2->getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled();
|
||||
// Should find a PC.
|
||||
|
||||
if (isUpdateTagFromWaitEnabled && !isStateCacheInvalidationWaRequired) {
|
||||
if (pCmdQ2->getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled()) {
|
||||
EXPECT_EQ(itorWalker2, itorCmd);
|
||||
} else {
|
||||
EXPECT_NE(itorWalker2, itorCmd);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
@@ -36,7 +35,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnque
|
||||
EXPECT_EQ(1u, numCommands);
|
||||
}
|
||||
|
||||
HWTEST_F(IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenAtLeastOnePipeControlIsInsertedBetweenWalkers) {
|
||||
HWTEST_F(IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenOnePipeControlIsInsertedBetweenWalkers) {
|
||||
|
||||
DebugManagerStateRestore restorer{};
|
||||
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
|
||||
@@ -48,8 +47,7 @@ HWTEST_F(IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenAtLeastO
|
||||
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
auto waNeeded = MemorySynchronizationCommands<FamilyType>::isBarrierWaRequired(pDevice->getRootDeviceEnvironment()) || (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired());
|
||||
auto waNeeded = MemorySynchronizationCommands<FamilyType>::isBarrierWaRequired(pDevice->getRootDeviceEnvironment());
|
||||
|
||||
auto itorCmd = find<PIPE_CONTROL *>(itorWalker1, itorWalker2);
|
||||
ASSERT_NE(itorWalker2, itorCmd);
|
||||
@@ -71,31 +69,3 @@ HWTEST_F(IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenAtLeastO
|
||||
EXPECT_EQ(commandStreamReceiver.getTagAllocation()->getGpuAddress(), NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*pipeControl));
|
||||
EXPECT_EQ(commandStreamReceiver.heaplessStateInitialized ? 2u : 1u, pipeControl->getImmediateData());
|
||||
}
|
||||
|
||||
HWTEST_F(IOQWithTwoWalkers, GivenStateCacheInvalidationWaIsRequiredWhenTwoKernelsAreEnqueuedThenPipeControlWithStateCacheInvalidationIsInsertedBetweenWalkers) {
|
||||
enqueueTwoKernels<FamilyType>();
|
||||
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
using COMPUTE_WALKER = typename FamilyType::DefaultWalkerType;
|
||||
|
||||
auto walkers = findAll<COMPUTE_WALKER *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_EQ(2u, walkers.size());
|
||||
|
||||
auto itorPC = findAll<PIPE_CONTROL *>(walkers[0], walkers[1]);
|
||||
|
||||
bool foundStateCacheInvalidation = false;
|
||||
for (auto it : itorPC) {
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*it);
|
||||
if (pcCmd->getStateCacheInvalidationEnable()) {
|
||||
foundStateCacheInvalidation = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
if (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired()) {
|
||||
EXPECT_TRUE(foundStateCacheInvalidation);
|
||||
} else {
|
||||
EXPECT_FALSE(foundStateCacheInvalidation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/hello_world_fixture.h"
|
||||
#include "opencl/test/unit_test/fixtures/two_walker_fixture.h"
|
||||
|
||||
@@ -37,16 +35,14 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, OOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnque
|
||||
EXPECT_EQ(1u, numCommands);
|
||||
}
|
||||
|
||||
HWTEST_F(OOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenAtLeastOnePipeControlIsInsertedBetweenWalkers) {
|
||||
HWTEST_F(OOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenOnePipeControlIsInsertedBetweenWalkers) {
|
||||
enqueueTwoKernels<FamilyType>();
|
||||
|
||||
auto itorCmd = find<typename FamilyType::PIPE_CONTROL *>(itorWalker1, itorWalker2);
|
||||
// Workaround for DRM i915 coherency patch
|
||||
// EXPECT_EQ(itorWalker2, itorCmd);
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
const bool isStateCacheInvalidationWaRequired = releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired();
|
||||
const bool isUpdateTagFromWaitEnabled = pCmdQ->getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled();
|
||||
|
||||
if (isUpdateTagFromWaitEnabled && !isStateCacheInvalidationWaRequired) {
|
||||
if (pCmdQ->getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled()) {
|
||||
EXPECT_EQ(itorWalker2, itorCmd);
|
||||
} else {
|
||||
EXPECT_NE(itorWalker2, itorCmd);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||
#include "shared/test/common/helpers/ult_gfx_core_helper.h"
|
||||
@@ -1251,22 +1250,17 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelRequiringDCFlush
|
||||
// Parse command list
|
||||
parseCommands<FamilyType>(commandStreamTask, 0);
|
||||
|
||||
auto pcItors = findAll<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_FALSE(pcItors.empty());
|
||||
|
||||
bool foundMatchingPipeControl = false;
|
||||
for (auto pcItor : pcItors) {
|
||||
auto pcCmd = genCmdCast<PIPE_CONTROL *>(*pcItor);
|
||||
ASSERT_NE(nullptr, pcCmd);
|
||||
|
||||
// Verify that the dcFlushEnabled bit is set in PC
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()) == pcCmd->getDcFlushEnable()) {
|
||||
foundMatchingPipeControl = true;
|
||||
break;
|
||||
}
|
||||
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itorPC);
|
||||
if (UnitTestHelper<FamilyType>::isPipeControlWArequired(pDevice->getHardwareInfo())) {
|
||||
itorPC++;
|
||||
itorPC = find<PIPE_CONTROL *>(itorPC, cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itorPC);
|
||||
}
|
||||
|
||||
EXPECT_TRUE(foundMatchingPipeControl);
|
||||
// Verify that the dcFlushEnabled bit is set in PC
|
||||
auto pCmdWA = reinterpret_cast<PIPE_CONTROL *>(*itorPC);
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()), pCmdWA->getDcFlushEnable());
|
||||
|
||||
buffer->release();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "shared/source/helpers/state_base_address.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||
#include "shared/test/common/helpers/raii_gfx_core_helper.h"
|
||||
@@ -77,9 +76,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFl
|
||||
|
||||
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itorPC);
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
if (UnitTestHelper<FamilyType>::isPipeControlWArequired(pDevice->getHardwareInfo()) || (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired())) {
|
||||
if (UnitTestHelper<FamilyType>::isPipeControlWArequired(pDevice->getHardwareInfo())) {
|
||||
itorPC++;
|
||||
itorPC = find<PIPE_CONTROL *>(itorPC, cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itorPC);
|
||||
@@ -92,7 +89,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFl
|
||||
buffer->release();
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnableUpdateTaskFromWaitWhenNonBlockingCallIsMadeThenNoPipeControlInsertedOnDevicesWithoutDCFlushAndStateCacheInvalidationWaRequirements) {
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnableUpdateTaskFromWaitWhenNonBlockingCallIsMadeThenNoPipeControlInsertedOnDevicesWithoutDCFlushRequirements) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.UpdateTaskCountFromWait.set(3u);
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
@@ -115,13 +112,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnableUpdateTaskFromWaitWhenN
|
||||
parseCommands<FamilyType>(commandStreamTask, 0);
|
||||
|
||||
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
|
||||
auto releaseHelper = pClDevice->getDevice().getReleaseHelper();
|
||||
if (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired()) {
|
||||
EXPECT_NE(cmdList.end(), itorPC);
|
||||
itorPC++;
|
||||
itorPC = find<PIPE_CONTROL *>(itorPC, cmdList.end());
|
||||
}
|
||||
EXPECT_EQ(cmdList.end(), itorPC);
|
||||
|
||||
buffer->release();
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/utilities/tag_allocator.h"
|
||||
#include "shared/source/utilities/wait_util.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
@@ -435,8 +434,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEnqueueingThe
|
||||
auto walker = genCmdCast<WalkerType *>(*it);
|
||||
|
||||
ASSERT_NE(nullptr, walker);
|
||||
auto releaseHelper = device->getDevice().getReleaseHelper();
|
||||
if (MemorySynchronizationCommands<FamilyType>::isBarrierWaRequired(device->getRootDeviceEnvironment()) || (releaseHelper && releaseHelper->isStateCacheInvalidationWaRequired())) {
|
||||
if (MemorySynchronizationCommands<FamilyType>::isBarrierWaRequired(device->getRootDeviceEnvironment())) {
|
||||
auto pipeControl = genCmdCast<PIPE_CONTROL *>(*++it);
|
||||
EXPECT_NE(nullptr, pipeControl);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ class ReleaseHelper {
|
||||
virtual bool shouldQueryPeerAccess() const = 0;
|
||||
virtual bool isSpirSupported() const = 0;
|
||||
virtual bool isSingleDispatchRequiredForMultiCCS() const = 0;
|
||||
virtual bool isStateCacheInvalidationWaRequired() const = 0;
|
||||
|
||||
protected:
|
||||
ReleaseHelper(HardwareIpVersion hardwareIpVersion) : hardwareIpVersion(hardwareIpVersion) {}
|
||||
@@ -120,7 +119,6 @@ class ReleaseHelperHw : public ReleaseHelper {
|
||||
bool shouldQueryPeerAccess() const override;
|
||||
bool isSpirSupported() const override;
|
||||
bool isSingleDispatchRequiredForMultiCCS() const override;
|
||||
bool isStateCacheInvalidationWaRequired() const override;
|
||||
|
||||
protected:
|
||||
ReleaseHelperHw(HardwareIpVersion hardwareIpVersion) : ReleaseHelper(hardwareIpVersion) {}
|
||||
|
||||
@@ -196,9 +196,4 @@ bool ReleaseHelperHw<releaseType>::isSingleDispatchRequiredForMultiCCS() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
bool ReleaseHelperHw<releaseType>::isStateCacheInvalidationWaRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -33,9 +33,4 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isStateCacheInvalidationWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -48,7 +48,6 @@ class MockReleaseHelper : public ReleaseHelper {
|
||||
ADDMETHOD_CONST_NOBASE(shouldQueryPeerAccess, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isSpirSupported, bool, true, ());
|
||||
ADDMETHOD_CONST_NOBASE(isSingleDispatchRequiredForMultiCCS, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isStateCacheInvalidationWaRequired, bool, false, ());
|
||||
|
||||
const SizeToPreferredSlmValueArray &getSizeToPreferredSlmValue(bool isHeapless) const override {
|
||||
static SizeToPreferredSlmValueArray sizeToPreferredSlmValue = {};
|
||||
|
||||
@@ -128,8 +128,4 @@ TEST_F(ReleaseHelper1255Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -128,8 +128,4 @@ TEST_F(ReleaseHelper1256Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -128,8 +128,4 @@ TEST_F(ReleaseHelper1257Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,4 @@ TEST_F(ReleaseHelper1260Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1260Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1260Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -112,8 +112,4 @@ TEST_F(ReleaseHelper1261Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1261Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1261Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,4 @@ TEST_F(ReleaseHelper1270Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1270Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1270Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,4 @@ TEST_F(ReleaseHelper1271Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1271Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1271Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -128,8 +128,4 @@ TEST_F(ReleaseHelper1274Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -121,8 +121,4 @@ TEST_F(ReleaseHelper2001Tests, whenShouldQueryPeerAccessCalledThenTrueReturned)
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenIsSingleDispatchRequiredForMultiCCSThenTrueReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -121,8 +121,4 @@ TEST_F(ReleaseHelper2002Tests, whenShouldQueryPeerAccessCalledThenTrueReturned)
|
||||
|
||||
TEST_F(ReleaseHelper2002Tests, whenIsSingleDispatchRequiredForMultiCCSThenTrueReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2002Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -124,8 +124,4 @@ TEST_F(ReleaseHelper2004Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper2004Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2004Tests, whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,4 @@ TEST_F(ReleaseHelper3000Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,4 @@ TEST_F(ReleaseHelper3001Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,4 @@ TEST_F(ReleaseHelper3003Tests, whenShouldQueryPeerAccessCalledThenFalseReturned)
|
||||
|
||||
TEST_F(ReleaseHelper3003Tests, whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned) {
|
||||
whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3003Tests, whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned) {
|
||||
whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
}
|
||||
@@ -231,22 +231,4 @@ void ReleaseHelperTestsBase::whenIsSingleDispatchRequiredForMultiCCSCalledThenTr
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_TRUE(releaseHelper->isSingleDispatchRequiredForMultiCCS());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_FALSE(releaseHelper->isStateCacheInvalidationWaRequired());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_TRUE(releaseHelper->isStateCacheInvalidationWaRequired());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,6 @@ struct ReleaseHelperTestsBase : public ::testing::Test {
|
||||
void whenShouldQueryPeerAccessCalledThenTrueReturned();
|
||||
void whenIsSingleDispatchRequiredForMultiCCSCalledThenFalseReturned();
|
||||
void whenIsSingleDispatchRequiredForMultiCCSCalledThenTrueReturned();
|
||||
void whenIsStateCacheInvalidationWaRequiredCalledThenFalseReturned();
|
||||
void whenIsStateCacheInvalidationWaRequiredCalledThenTrueReturned();
|
||||
virtual std::vector<uint32_t> getRevisions() = 0;
|
||||
|
||||
std::unique_ptr<ReleaseHelper> releaseHelper;
|
||||
|
||||
Reference in New Issue
Block a user