Disable stateless compression in sba on indirect host access flag

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-09-21 14:44:15 +00:00
committed by Compute-Runtime-Automation
parent a2e41716e2
commit 5c4c02d2e7
2 changed files with 18 additions and 6 deletions

View File

@ -414,7 +414,7 @@ TEST_F(KernelArgBufferTest, givenInvalidKernelObjWhenHasDirectStatelessAccessToH
EXPECT_FALSE(pKernel->hasDirectStatelessAccessToHostMemory());
}
TEST_F(KernelArgBufferTest, givenKernelWithIndirectStatelessAccessWhenHasIndirectStatelessAccessToHostMemoryIsCalledThenReturnTrueForHostMemoryAllocations) {
TEST_F(KernelArgBufferTest, givenKernelWithIndirectStatelessAccessAndKernelExecInfoWithUsmPtrsWhenHasIndirectStatelessAccessToHostMemoryIsCalledThenReturnTrueForHostMemoryAllocations) {
KernelInfo kernelInfo;
EXPECT_FALSE(kernelInfo.hasIndirectStatelessAccess);
@ -443,7 +443,7 @@ TEST_F(KernelArgBufferTest, givenKernelWithIndirectStatelessAccessWhenHasIndirec
}
}
TEST_F(KernelArgBufferTest, givenKernelExecInfoWithIndirectStatelessAccessWhenHasIndirectStatelessAccessToHostMemoryIsCalledThenReturnTrueForHostMemoryAllocations) {
TEST_F(KernelArgBufferTest, givenKernelWithIndirectStatelessAccessAndUsmAllocationsInSVMAllocsManagerWhenHasIndirectStatelessAccessToHostMemoryIsCalledThenReturnTrueForHostMemoryAllocations) {
KernelInfo kernelInfo;
kernelInfo.hasIndirectStatelessAccess = true;
@ -456,9 +456,6 @@ TEST_F(KernelArgBufferTest, givenKernelExecInfoWithIndirectStatelessAccessWhenHa
return;
}
mockKernel.unifiedMemoryControls.indirectHostAllocationsAllowed = true;
EXPECT_FALSE(mockKernel.hasIndirectStatelessAccessToHostMemory());
auto deviceProperties = SVMAllocsManager::UnifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, mockKernel.getContext().getRootDeviceIndices(), mockKernel.getContext().getDeviceBitfields());
deviceProperties.device = &pClDevice->getDevice();
auto unifiedDeviceMemoryAllocation = svmAllocationsManager->createUnifiedMemoryAllocation(4096u, deviceProperties);
@ -472,6 +469,17 @@ TEST_F(KernelArgBufferTest, givenKernelExecInfoWithIndirectStatelessAccessWhenHa
svmAllocationsManager->freeSVMAlloc(unifiedHostMemoryAllocation);
}
TEST_F(KernelArgBufferTest, givenKernelExecInfoWithIndirectHostAllocationsAllowedWhenHasIndirectStatelessAccessToHostMemoryIsCalledThenReturnTrue) {
KernelInfo kernelInfo;
MockKernel mockKernel(pProgram, kernelInfo, *pClDevice);
EXPECT_FALSE(mockKernel.unifiedMemoryControls.indirectHostAllocationsAllowed);
EXPECT_FALSE(mockKernel.hasIndirectStatelessAccessToHostMemory());
mockKernel.unifiedMemoryControls.indirectHostAllocationsAllowed = true;
EXPECT_TRUE(mockKernel.hasIndirectStatelessAccessToHostMemory());
}
TEST_F(KernelArgBufferTest, whenSettingAuxTranslationRequiredThenIsAuxTranslationRequiredReturnsCorrectValue) {
for (auto auxTranslationRequired : {false, true}) {
pKernel->setAuxTranslationRequired(auxTranslationRequired);