refactor: move semaphore to smem when no acquire fence required

Related-To: NEO-14642

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-04-30 12:07:36 +00:00
committed by Compute-Runtime-Automation
parent 1c42b26f41
commit 3d1ea7165c
2 changed files with 10 additions and 5 deletions

View File

@@ -223,7 +223,7 @@ void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationD
allocationData.flags.requiresCpuAccess = true;
}
if (properties.allocationType == AllocationType::semaphoreBuffer) {
if (properties.allocationType == AllocationType::semaphoreBuffer && !rootDeviceEnvironment.getProductHelper().isGlobalFenceInDirectSubmissionRequired(hwInfo)) {
allocationData.flags.useSystemMemory = true;
}
}

View File

@@ -216,10 +216,15 @@ void GfxCoreHelperHw<Family>::setL1CachePolicy(bool useL1Cache, typename Family:
template <>
void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) const {
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
if (hwInfo.featureTable.flags.ftrLocalMemory &&
(properties.allocationType == AllocationType::timestampPacketTagBuffer ||
properties.allocationType == AllocationType::commandBuffer)) {
allocationData.flags.useSystemMemory = false;
if (hwInfo.featureTable.flags.ftrLocalMemory) {
if (properties.allocationType == AllocationType::timestampPacketTagBuffer ||
properties.allocationType == AllocationType::commandBuffer) {
allocationData.flags.useSystemMemory = false;
}
if (properties.allocationType == AllocationType::semaphoreBuffer && !rootDeviceEnvironment.getProductHelper().isGlobalFenceInDirectSubmissionRequired(hwInfo)) {
allocationData.flags.useSystemMemory = true;
}
}
}