mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix: Use system ptr for 32 bit svm cpu
Resolves: HSD-14025543711 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
09981f7102
commit
0ec6f51e0e
@@ -29,6 +29,11 @@ std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStre
|
||||
|
||||
template <>
|
||||
std::optional<GfxMemoryAllocationMethod> ProductHelperHw<gfxProduct>::getPreferredAllocationMethod(AllocationType allocationType) const {
|
||||
if constexpr (is32bit) {
|
||||
if (allocationType == AllocationType::svmCpu) { // no heap SVM in allocateByKmd on 32 bit
|
||||
return GfxMemoryAllocationMethod::useUmdSystemPtr;
|
||||
}
|
||||
}
|
||||
return GfxMemoryAllocationMethod::allocateByKmd;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,12 +71,20 @@ BMGTEST_F(BmgProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSup
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, whenCheckPreferredAllocationMethodThenAllocateByKmdIsReturnedExceptTagBufferAndTimestampPacketTagBuffer) {
|
||||
BMGTEST_F(BmgProductHelper, whenCheckPreferredAllocationMethodThenAllocateByKmdIsReturnedExcept32bitSvmCpu) {
|
||||
for (auto i = 0; i < static_cast<int>(AllocationType::count); i++) {
|
||||
auto allocationType = static_cast<AllocationType>(i);
|
||||
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
|
||||
EXPECT_TRUE(preferredAllocationMethod.has_value());
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
|
||||
if constexpr (is32bit) {
|
||||
if (allocationType == AllocationType::svmCpu) {
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::useUmdSystemPtr, preferredAllocationMethod.value());
|
||||
} else {
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
|
||||
}
|
||||
} else {
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user