feature: download tbx allocations in copy offload path

Related-To: NEO-11376

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-06-14 17:28:15 +00:00
committed by Compute-Runtime-Automation
parent dd241d6848
commit 365a6c0eaa
3 changed files with 46 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily<gfxCoreFami
using BaseClass::isCopyOnly;
using BaseClass::isInOrderExecutionEnabled;
using BaseClass::isSkippingInOrderBarrierAllowed;
using BaseClass::isTbxMode;
using ComputeFlushMethodType = NEO::CompletionStamp (CommandListCoreFamilyImmediate<gfxCoreFamily>::*)(NEO::LinearStream &, size_t, bool, bool, bool);

View File

@@ -960,6 +960,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
TaskCountType copyOffloadTaskCount = 0;
NEO::CommandStreamReceiver *mainQueueCsr = getCsr(false);
NEO::CommandStreamReceiver *copyOffloadCsr = nullptr;
NEO::InternalAllocationStorage *mainInternalAllocStorage = mainQueueCsr->getInternalAllocationStorage();
NEO::InternalAllocationStorage *copyOffloadInternalAllocStorage = nullptr;
@@ -969,7 +970,8 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
if (isCopyOffloadEnabled()) {
copyOffloadTaskCount = this->cmdQImmediateCopyOffload->getTaskCount();
copyOffloadInternalAllocStorage = getCsr(true)->getInternalAllocationStorage();
copyOffloadCsr = getCsr(true);
copyOffloadInternalAllocStorage = copyOffloadCsr->getInternalAllocationStorage();
copyOffloadStorageCleanupNeeded = !copyOffloadInternalAllocStorage->getTemporaryAllocations().peekIsEmpty();
if (this->latestFlushIsCopyOffload) {
@@ -1004,6 +1006,13 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
this->latestHostWaitedInOrderSyncValue = inOrderSyncValue;
}
if (this->isTbxMode && (status == ZE_RESULT_SUCCESS)) {
mainQueueCsr->downloadAllocations();
if (isCopyOffloadEnabled()) {
copyOffloadCsr->downloadAllocations();
}
}
if (handlePostWaitOperations) {
if (status == ZE_RESULT_SUCCESS) {
this->cmdQImmediate->unregisterCsrClient();