Align only CPU VA for SVM_CPU
Resolves: NEO-7608 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
eff5a281ed
commit
39df92a16f
|
@ -389,6 +389,11 @@ 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();
|
||||
|
|
|
@ -75,9 +75,4 @@ bool ProductHelperHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
|
||||
return MemoryConstants::pageSize2Mb;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -78,9 +78,4 @@ bool ProductHelperHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
|
||||
return MemoryConstants::pageSize2Mb;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -342,7 +342,12 @@ DrmAllocation *DrmMemoryManager::allocateGraphicsMemoryWithAlignmentImpl(const A
|
|||
}
|
||||
}
|
||||
|
||||
auto drmAllocation = createAllocWithAlignment(allocationData, cSize, cAlignment, alignedStorageSize, alignedGpuAddress);
|
||||
auto mmapAlignment = cAlignment;
|
||||
if (svmCpuAllocation && alignedStorageSize >= 2 * MemoryConstants::megaByte) {
|
||||
mmapAlignment = MemoryConstants::pageSize2Mb;
|
||||
}
|
||||
|
||||
auto drmAllocation = createAllocWithAlignment(allocationData, cSize, mmapAlignment, alignedStorageSize, alignedGpuAddress);
|
||||
if (drmAllocation != nullptr) {
|
||||
drmAllocation->setReservedAddressRange(reinterpret_cast<void *>(gpuReservationAddress), alignedVirtualAddressRangeSize);
|
||||
}
|
||||
|
|
|
@ -8,4 +8,9 @@
|
|||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isVmBindPatIndexProgrammingSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
size_t ProductHelperHw<gfxProduct>::getSvmCpuAlignment() const {
|
||||
return MemoryConstants::pageSize64k;
|
||||
}
|
|
@ -5,8 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
|
@ -165,11 +163,6 @@ 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;
|
||||
|
|
|
@ -338,11 +338,6 @@ 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) const {
|
||||
}
|
||||
|
|
|
@ -35,15 +35,7 @@ PVCTEST_F(PvcProductHelperLinux, WhenConfiguringHwInfoThenZeroIsReturned) {
|
|||
}
|
||||
|
||||
PVCTEST_F(PvcProductHelperLinux, WhenGetSvmCpuAlignmentThenProperValueIsReturned) {
|
||||
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());
|
||||
}
|
||||
EXPECT_EQ(MemoryConstants::pageSize64k, productHelper->getSvmCpuAlignment());
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcProductHelperLinux, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {
|
||||
|
|
Loading…
Reference in New Issue