Revert "feature: enable in-order counter waits if temp allocation storage is ...
This reverts commit c9376c9829
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
bfc19ee342
commit
71617c19b3
|
@ -894,11 +894,7 @@ template <GFXCORE_FAMILY gfxCoreFamily>
|
|||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint64_t timeout, TaskCountType taskCount, bool handlePostWaitOperations) {
|
||||
ze_result_t status = ZE_RESULT_SUCCESS;
|
||||
|
||||
auto internalAllocStorage = this->csr->getInternalAllocationStorage();
|
||||
|
||||
auto tempAllocsCleanupRequired = handlePostWaitOperations && !internalAllocStorage->getTemporaryAllocations().peekIsEmpty();
|
||||
|
||||
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !tempAllocsCleanupRequired && this->latestFlushIsHostVisible);
|
||||
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !handlePostWaitOperations && this->latestFlushIsHostVisible);
|
||||
|
||||
if (inOrderWaitAllowed) {
|
||||
status = synchronizeInOrderExecution(timeout);
|
||||
|
@ -917,10 +913,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
|
|||
if (handlePostWaitOperations && status != ZE_RESULT_NOT_READY) {
|
||||
if (status == ZE_RESULT_SUCCESS) {
|
||||
this->cmdQImmediate->unregisterCsrClient();
|
||||
|
||||
if (tempAllocsCleanupRequired) {
|
||||
internalAllocStorage->cleanAllocationList(taskCount, NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
}
|
||||
this->csr->getInternalAllocationStorage()->cleanAllocationList(taskCount, NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
}
|
||||
|
||||
this->printKernelsPrintfOutput(status == ZE_RESULT_ERROR_DEVICE_LOST);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/kernel/implicit_args.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
|
@ -27,7 +26,6 @@
|
|||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_direct_submission_hw.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
|
@ -871,11 +869,6 @@ HWTEST2_F(InOrderCmdListTests, givenCmdListsWhenDispatchingThenUseInternalTaskCo
|
|||
|
||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
|
||||
|
||||
auto mockAlloc = std::make_unique<MockGraphicsAllocation>();
|
||||
|
||||
auto internalAllocStorage = ultCsr->getInternalAllocationStorage();
|
||||
internalAllocStorage->storeAllocationWithTaskCount(std::move(mockAlloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, 123);
|
||||
|
||||
immCmdList0->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false);
|
||||
|
||||
immCmdList1->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false);
|
||||
|
@ -2091,11 +2084,6 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingRegularEventThenCl
|
|||
HWTEST2_F(InOrderCmdListTests, givenHostVisibleEventOnLatestFlushWhenCallingSynchronizeThenUseInOrderSync, IsAtLeastSkl) {
|
||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
|
||||
|
||||
auto mockAlloc = std::make_unique<MockGraphicsAllocation>();
|
||||
|
||||
auto internalAllocStorage = ultCsr->getInternalAllocationStorage();
|
||||
internalAllocStorage->storeAllocationWithTaskCount(std::move(mockAlloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, 123);
|
||||
|
||||
auto immCmdList = createImmCmdList<gfxCoreFamily>();
|
||||
|
||||
auto eventPool = createEvents<FamilyType>(1, true);
|
||||
|
@ -2145,37 +2133,6 @@ HWTEST2_F(InOrderCmdListTests, givenHostVisibleEventOnLatestFlushWhenCallingSync
|
|||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenEmptyTempAllocationsStorageWhenCallingSynchronizeThenUseInternalCounter, IsAtLeastSkl) {
|
||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
|
||||
|
||||
auto mockAlloc = std::make_unique<MockGraphicsAllocation>();
|
||||
|
||||
auto internalAllocStorage = ultCsr->getInternalAllocationStorage();
|
||||
|
||||
auto immCmdList = createImmCmdList<gfxCoreFamily>();
|
||||
|
||||
auto eventPool = createEvents<FamilyType>(1, true);
|
||||
events[0]->signalScope = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
|
||||
immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false);
|
||||
EXPECT_TRUE(immCmdList->latestFlushIsHostVisible);
|
||||
|
||||
EXPECT_EQ(0u, immCmdList->synchronizeInOrderExecutionCalled);
|
||||
EXPECT_EQ(0u, ultCsr->waitForCompletionWithTimeoutTaskCountCalled);
|
||||
|
||||
immCmdList->hostSynchronize(0, 1, true);
|
||||
|
||||
EXPECT_EQ(1u, immCmdList->synchronizeInOrderExecutionCalled);
|
||||
EXPECT_EQ(0u, ultCsr->waitForCompletionWithTimeoutTaskCountCalled);
|
||||
|
||||
internalAllocStorage->storeAllocationWithTaskCount(std::move(mockAlloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, 123);
|
||||
|
||||
immCmdList->hostSynchronize(0, 1, true);
|
||||
|
||||
EXPECT_EQ(1u, immCmdList->synchronizeInOrderExecutionCalled);
|
||||
EXPECT_EQ(1u, ultCsr->waitForCompletionWithTimeoutTaskCountCalled);
|
||||
}
|
||||
|
||||
using NonPostSyncWalkerMatcher = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenPatchingThenThrow, NonPostSyncWalkerMatcher) {
|
||||
|
@ -3377,11 +3334,6 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenCallingSyncThenHandleCompleti
|
|||
|
||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
|
||||
|
||||
auto mockAlloc = std::make_unique<MockGraphicsAllocation>();
|
||||
|
||||
auto internalAllocStorage = ultCsr->getInternalAllocationStorage();
|
||||
internalAllocStorage->storeAllocationWithTaskCount(std::move(mockAlloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, 123);
|
||||
|
||||
auto eventPool = createEvents<FamilyType>(1, false);
|
||||
|
||||
immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false);
|
||||
|
|
Loading…
Reference in New Issue