fix: Disable cache for heaps when mitigating dc flush

Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-05-31 12:19:19 +00:00
committed by Compute-Runtime-Automation
parent 2919d93778
commit eb3b0c5711
3 changed files with 11 additions and 6 deletions

View File

@@ -422,7 +422,9 @@ bool ProductHelperHw<gfxProduct>::overrideCacheableForDcFlushMitigation(Allocati
allocationType == AllocationType::mapAllocation ||
allocationType == AllocationType::svmCpu ||
allocationType == AllocationType::svmZeroCopy ||
allocationType == AllocationType::internalHostMemory);
allocationType == AllocationType::internalHostMemory ||
allocationType == AllocationType::internalHeap ||
allocationType == AllocationType::linearStream);
}
template <PRODUCT_FAMILY gfxProduct>

View File

@@ -751,16 +751,17 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu
case AllocationType::tagBuffer:
expectedUsage = uncachedGmmUsageType;
break;
case AllocationType::linearStream:
case AllocationType::internalHeap:
expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED;
break;
case AllocationType::constantSurface:
expectedUsage = GMM_RESOURCE_USAGE_OCL_BUFFER_CONST;
break;
case AllocationType::image:
expectedUsage = GMM_RESOURCE_USAGE_OCL_IMAGE;
break;
case AllocationType::internalHeap:
case AllocationType::linearStream:
expectedUsage = GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER;
break;
case AllocationType::fillPattern:
expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
break;

View File

@@ -326,7 +326,9 @@ HWTEST_F(ProductHelperTest, givenDcFlushMitigationWhenOverridePatAndUsageForDcFl
allocationType == AllocationType::internalHostMemory ||
allocationType == AllocationType::timestampPacketTagBuffer ||
allocationType == AllocationType::tagBuffer ||
allocationType == AllocationType::gpuTimestampDeviceBuffer) {
allocationType == AllocationType::gpuTimestampDeviceBuffer ||
allocationType == AllocationType::linearStream ||
allocationType == AllocationType::internalHeap) {
EXPECT_EQ(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType), productHelper->isDcFlushMitigated());
} else {
EXPECT_FALSE(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType));