Revert "Disable RelaxedOrdering if UpdateTagFromWait is disabled"

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-03-27 09:06:13 +00:00
committed by Compute-Runtime-Automation
parent fb82af429b
commit e49e245bec
13 changed files with 19 additions and 41 deletions

View File

@ -548,7 +548,6 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
DebugManagerStateRestore restorer;
DebugManager.flags.SplitBcsCopy.set(1);
DebugManager.flags.UpdateTaskCountFromWait.set(3);
ze_result_t returnValue;
auto hwInfo = *NEO::defaultHwInfo;

View File

@ -509,7 +509,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
SubmissionStatus flushTagUpdate() override { return SubmissionStatus::SUCCESS; };
void updateTagFromWait() override{};
bool isUpdateTagFromWaitEnabled() const override { return false; };
bool isUpdateTagFromWaitEnabled() override { return false; };
void createKernelArgsBufferAllocation() override {}
bool isMultiOsContextCapable() const override { return false; }

View File

@ -250,7 +250,7 @@ class CommandStreamReceiver {
virtual SubmissionStatus flushTagUpdate() = 0;
virtual void updateTagFromWait() = 0;
virtual bool isUpdateTagFromWaitEnabled() const = 0;
virtual bool isUpdateTagFromWaitEnabled() = 0;
ScratchSpaceController *getScratchSpaceController() const {
return scratchSpaceController.get();
@ -269,7 +269,7 @@ class CommandStreamReceiver {
void startControllingDirectSubmissions();
bool isAnyDirectSubmissionEnabled() const {
bool isAnyDirectSubmissionEnabled() {
return this->isDirectSubmissionEnabled() || isBlitterDirectSubmissionEnabled();
}

View File

@ -105,7 +105,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
size_t commandStreamStartTask);
SubmissionStatus flushHandler(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency);
bool isUpdateTagFromWaitEnabled() const override;
bool isUpdateTagFromWaitEnabled() override;
void updateTagFromWait() override;
bool isMultiOsContextCapable() const override;

View File

@ -1459,7 +1459,7 @@ inline SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushHandler(BatchBu
}
template <typename GfxFamily>
inline bool CommandStreamReceiverHw<GfxFamily>::isUpdateTagFromWaitEnabled() const {
inline bool CommandStreamReceiverHw<GfxFamily>::isUpdateTagFromWaitEnabled() {
auto &gfxCoreHelper = getGfxCoreHelper();
auto enabled = gfxCoreHelper.isUpdateTaskCountFromWaitSupported();
enabled &= this->isAnyDirectSubmissionEnabled();

View File

@ -16,7 +16,6 @@ DirectSubmissionInputParams::DirectSubmissionInputParams(const CommandStreamRece
globalFenceAllocation = commandStreamReceiver.getGlobalFenceAllocation();
workPartitionAllocation = commandStreamReceiver.getWorkPartitionAllocation();
completionFenceAllocation = commandStreamReceiver.getTagAllocation();
isUpdateTagFromWaitEnabled = commandStreamReceiver.isUpdateTagFromWaitEnabled();
}
} // namespace NEO

View File

@ -70,7 +70,6 @@ struct DirectSubmissionInputParams : NonCopyableClass {
GraphicsAllocation *workPartitionAllocation = nullptr;
GraphicsAllocation *completionFenceAllocation = nullptr;
const uint32_t rootDeviceIndex;
bool isUpdateTagFromWaitEnabled = false;
};
template <typename GfxFamily, typename Dispatcher>

View File

@ -85,7 +85,7 @@ DirectSubmissionHw<GfxFamily, Dispatcher>::DirectSubmissionHw(const DirectSubmis
dcFlushRequired = MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, inputParams.rootDeviceEnvironment);
auto &gfxCoreHelper = inputParams.rootDeviceEnvironment.getHelper<GfxCoreHelper>();
relaxedOrderingEnabled = gfxCoreHelper.isRelaxedOrderingSupported() && inputParams.isUpdateTagFromWaitEnabled;
relaxedOrderingEnabled = gfxCoreHelper.isRelaxedOrderingSupported();
this->currentRelaxedOrderingQueueSize = RelaxedOrderingHelper::queueSizeMultiplier;

View File

@ -71,7 +71,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
SubmissionStatus flushTagUpdate() override { return SubmissionStatus::SUCCESS; };
void updateTagFromWait() override{};
bool isUpdateTagFromWaitEnabled() const override { return false; };
bool isUpdateTagFromWaitEnabled() override { return false; };
bool isMultiOsContextCapable() const override { return multiOsContextCapable; }

View File

@ -134,8 +134,8 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWithoutCompletionFenceAlloca
EXPECT_EQ(nullptr, directSubmission.completionFenceAllocation);
size_t expectedAllocationsCnt = 3;
if (directSubmission.isRelaxedOrderingEnabled()) {
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}
@ -166,7 +166,8 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWithCompletionFenceAllocatio
EXPECT_EQ(&completionFenceAllocation, directSubmission.completionFenceAllocation);
size_t expectedAllocationsCnt = 4;
if (directSubmission.isRelaxedOrderingEnabled()) {
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}

View File

@ -1017,7 +1017,6 @@ HWTEST_F(DirectSubmissionDispatchBufferTest, givenDebugFlagSetWhenStoppingRingbu
struct DirectSubmissionRelaxedOrderingTests : public DirectSubmissionDispatchBufferTest {
void SetUp() override {
DebugManager.flags.DirectSubmissionRelaxedOrdering.set(1);
DebugManager.flags.UpdateTaskCountFromWait.set(3);
DirectSubmissionDispatchBufferTest::SetUp();
}
@ -2705,24 +2704,4 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenNumClientsWhenAskingIfRelax
ultCsr->registerClient();
EXPECT_EQ(4u, ultCsr->getNumClients());
EXPECT_TRUE(NEO::RelaxedOrderingHelper::isRelaxedOrderingDispatchAllowed(*ultCsr, 1));
}
HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenUpdateTagFromWaitDisabledWhenCreatingDirectSubmissionThenDisableRelaxedOrdering, IsAtLeastXeHpcCore) {
DebugManager.flags.DirectSubmissionRelaxedOrdering.set(-1);
auto csr = pDevice->getDefaultEngine().commandStreamReceiver;
DebugManager.flags.UpdateTaskCountFromWait.set(0);
{
MockDirectSubmissionHw<FamilyType, RenderDispatcher<FamilyType>> directSubmission(*csr);
EXPECT_FALSE(directSubmission.isRelaxedOrderingEnabled());
}
DebugManager.flags.DirectSubmissionRelaxedOrdering.set(1);
{
MockDirectSubmissionHw<FamilyType, RenderDispatcher<FamilyType>> directSubmission(*csr);
EXPECT_TRUE(directSubmission.isRelaxedOrderingEnabled());
}
}

View File

@ -62,8 +62,9 @@ HWTEST_F(WddmDirectSubmissionTest, givenWddmWhenDirectIsInitializedAndStartedThe
EXPECT_NE(nullptr, wddmDirectSubmission->ringBuffers[1].ringBuffer);
EXPECT_NE(nullptr, wddmDirectSubmission->semaphores);
auto &gfxCoreHelper = device->getGfxCoreHelper();
size_t expectedAllocationsCnt = 3;
if (wddmDirectSubmission->isRelaxedOrderingEnabled()) {
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}
@ -98,8 +99,9 @@ HWTEST_F(WddmDirectSubmissionNoPreemptionTest, givenWddmWhenDirectIsInitializedA
EXPECT_NE(nullptr, wddmDirectSubmission->ringBuffers[1].ringBuffer);
EXPECT_NE(nullptr, wddmDirectSubmission->semaphores);
auto &gfxCoreHelper = device->getGfxCoreHelper();
size_t expectedAllocationsCnt = 3;
if (wddmDirectSubmission->isRelaxedOrderingEnabled()) {
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}
@ -140,9 +142,9 @@ HWTEST_F(WddmDirectSubmissionTest, givenWddmWhenAllocateOsResourcesThenExpectRin
bool ret = wddmDirectSubmission.allocateResources();
EXPECT_TRUE(ret);
auto &gfxCoreHelper = device->getGfxCoreHelper();
size_t expectedAllocationsCnt = 3;
if (wddmDirectSubmission.isRelaxedOrderingEnabled()) {
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}
@ -184,9 +186,9 @@ HWTEST_F(WddmDirectSubmissionTest, givenWddmWhenAllocateOsResourcesResidencyFail
bool ret = wddmDirectSubmission.allocateResources();
EXPECT_FALSE(ret);
auto &gfxCoreHelper = device->getGfxCoreHelper();
size_t expectedAllocationsCnt = 3;
if (wddmDirectSubmission.isRelaxedOrderingEnabled()) {
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
expectedAllocationsCnt += 2;
}

View File

@ -26,7 +26,6 @@ struct MockWddmDirectSubmission : public WddmDirectSubmission<GfxFamily, Dispatc
using BaseClass::handleCompletionFence;
using BaseClass::handleResidency;
using BaseClass::isCompleted;
using BaseClass::isRelaxedOrderingEnabled;
using BaseClass::miMemFenceRequired;
using BaseClass::osContextWin;
using BaseClass::ringBuffers;