mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
feature: enable in-order counter waits if temp allocation storage is empty
Related-To: NEO-7966 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
afd693387b
commit
c9376c9829
@@ -893,7 +893,11 @@ template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint64_t timeout, TaskCountType taskCount, bool handlePostWaitOperations) {
|
||||
ze_result_t status = ZE_RESULT_SUCCESS;
|
||||
|
||||
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !handlePostWaitOperations && this->latestFlushIsHostVisible);
|
||||
auto internalAllocStorage = this->csr->getInternalAllocationStorage();
|
||||
|
||||
auto tempAllocsCleanupRequired = handlePostWaitOperations && !internalAllocStorage->getTemporaryAllocations().peekIsEmpty();
|
||||
|
||||
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !tempAllocsCleanupRequired && this->latestFlushIsHostVisible);
|
||||
|
||||
if (inOrderWaitAllowed) {
|
||||
status = synchronizeInOrderExecution(timeout);
|
||||
@@ -912,7 +916,10 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
|
||||
if (handlePostWaitOperations && status != ZE_RESULT_NOT_READY) {
|
||||
if (status == ZE_RESULT_SUCCESS) {
|
||||
this->cmdQImmediate->unregisterCsrClient();
|
||||
this->csr->getInternalAllocationStorage()->cleanAllocationList(taskCount, NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
|
||||
if (tempAllocsCleanupRequired) {
|
||||
internalAllocStorage->cleanAllocationList(taskCount, NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
}
|
||||
}
|
||||
|
||||
this->printKernelsPrintfOutput(status == ZE_RESULT_ERROR_DEVICE_LOST);
|
||||
|
||||
Reference in New Issue
Block a user