[PVC] Restore 2MB alignment for SVM_CPU allocations

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-01-04 13:49:06 +00:00
committed by Compute-Runtime-Automation
parent db545cd771
commit fca4fbb0c0
7 changed files with 36 additions and 16 deletions

View File

@@ -400,11 +400,6 @@ uint32_t ProductHelperHw<gfxProduct>::getThreadEuRatioForScratch(const HardwareI
return 8u;
}
template <PRODUCT_FAMILY gfxProduct>
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
return MemoryConstants::pageSize2Mb;
}
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isComputeDispatchAllWalkerEnableInCfeStateRequired(const HardwareInfo &hwInfo) const {
return getFrontEndPropertyComputeDispatchAllWalkerSupport();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -75,4 +75,9 @@ bool ProductHelperHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
return true;
}
template <PRODUCT_FAMILY gfxProduct>
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
return MemoryConstants::pageSize2Mb;
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -78,4 +78,9 @@ bool ProductHelperHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
return true;
}
template <PRODUCT_FAMILY gfxProduct>
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
return MemoryConstants::pageSize2Mb;
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -8,9 +8,4 @@
template <>
bool ProductHelperHw<gfxProduct>::isVmBindPatIndexProgrammingSupported() const {
return true;
}
template <>
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
return MemoryConstants::pageSize64k;
}

View File

@@ -1,10 +1,12 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "aubstream/product_family.h"
namespace NEO {
@@ -163,6 +165,11 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const Hardwar
return false;
}
template <>
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
return DebugManager.flags.NEO_CAL_ENABLED.get() ? MemoryConstants::pageSize64k : MemoryConstants::pageSize2Mb;
}
template <>
bool ProductHelperHw<gfxProduct>::isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const {
return true;

View File

@@ -343,6 +343,11 @@ bool ProductHelperHw<IGFX_UNKNOWN>::isMatrixMultiplyAccumulateSupported(const Ha
return false;
}
template <>
size_t ProductHelperHw<IGFX_UNKNOWN>::getSvmCpuAlignment() const {
return MemoryConstants::pageSize64k;
}
template <>
void ProductHelperHw<IGFX_UNKNOWN>::updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -35,7 +35,15 @@ PVCTEST_F(PvcProductHelperLinux, WhenConfiguringHwInfoThenZeroIsReturned) {
}
PVCTEST_F(PvcProductHelperLinux, WhenGetSvmCpuAlignmentThenProperValueIsReturned) {
EXPECT_EQ(MemoryConstants::pageSize64k, productHelper->getSvmCpuAlignment());
DebugManagerStateRestore restorer;
{
DebugManager.flags.NEO_CAL_ENABLED.set(true);
EXPECT_EQ(MemoryConstants::pageSize64k, productHelper->getSvmCpuAlignment());
}
{
DebugManager.flags.NEO_CAL_ENABLED.set(false);
EXPECT_EQ(MemoryConstants::pageSize2Mb, productHelper->getSvmCpuAlignment());
}
}
PVCTEST_F(PvcProductHelperLinux, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {