refactor: don't use global ProductHelper getter 17

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-27 18:07:04 +00:00
committed by Compute-Runtime-Automation
parent 2f09a07445
commit 29f54be816
24 changed files with 94 additions and 98 deletions

View File

@@ -2105,6 +2105,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfiling(Event *event,
dispatchEventPostSyncOperation(event, Event::STATE_SIGNALED, true, false, false);
const auto &hwInfo = this->device->getHwInfo();
const auto &rootDeviceEnvironment = this->device->getNEODevice()->getRootDeviceEnvironment();
NEO::PipeControlArgs args;
args.dcFlushEnable = getDcFlushRequired(event->isSignalScope());
NEO::MemorySynchronizationCommands<GfxFamily>::setPostSyncExtraProperties(args,
@@ -2113,7 +2114,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfiling(Event *event,
NEO::MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandContainer.getCommandStream(), args);
uint64_t baseAddr = event->getGpuAddress(this->device);
NEO::MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(*commandContainer.getCommandStream(), baseAddr, false, hwInfo);
NEO::MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(*commandContainer.getCommandStream(), baseAddr, false, rootDeviceEnvironment);
bool workloadPartition = isTimestampEventForMultiTile(event);
appendWriteKernelTimestamp(event, beforeWalker, true, workloadPartition);
}
@@ -2638,13 +2639,13 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWaitOnMemory(void *desc,
data,
comparator);
const auto &hwInfo = this->device->getHwInfo();
const auto &rootDeviceEnvironment = this->device->getNEODevice()->getRootDeviceEnvironment();
auto allocType = srcAllocationStruct.alloc->getAllocationType();
bool isSystemMemoryUsed =
(allocType == NEO::AllocationType::BUFFER_HOST_MEMORY) ||
(allocType == NEO::AllocationType::EXTERNAL_HOST_PTR);
if (isSystemMemoryUsed) {
NEO::MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(*commandContainer.getCommandStream(), gpuAddress, true, hwInfo);
NEO::MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(*commandContainer.getCommandStream(), gpuAddress, true, rootDeviceEnvironment);
}
appendSignalEventPostWalker(signalEvent);

View File

@@ -448,7 +448,7 @@ HWTEST2_F(MultiTileCommandListAppendBarrier,
NEO::EncodeMath<FamilyType>::streamCommandSize + sizeof(MI_STORE_REGISTER_MEM));
size_t postBarrierSynchronization = NEO::MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false) +
NEO::MemorySynchronizationCommands<FamilyType>::getSizeForSingleAdditionalSynchronization(device->getHwInfo());
NEO::MemorySynchronizationCommands<FamilyType>::getSizeForSingleAdditionalSynchronization(device->getNEODevice()->getRootDeviceEnvironment());
size_t stopRegisters = timestampRegisters + postBarrierSynchronization;
auto useSizeBefore = cmdListStream->getUsed();