mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
Move memory for slm window to memory manager
remove redundant methods from MockDevice Related-To: NEO-3007 Change-Id: I9cc819b9c9118dbb667f5bf87d1bf15787f9b67f Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
89824aa848
commit
18982bd016
@@ -147,17 +147,17 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, cpuCopyCriteriaMet) {
|
||||
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_USE_HOST_PTR, 1 * MB, smallBufferPtr, retVal));
|
||||
|
||||
// platform LP == true && size <= 10 MB
|
||||
mockDevice->getDeviceInfoToModify()->platformLP = true;
|
||||
mockDevice->deviceInfo.platformLP = true;
|
||||
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, smallBufferPtr, 1 * MB));
|
||||
|
||||
// platform LP == false && size <= 10 MB
|
||||
mockDevice->getDeviceInfoToModify()->platformLP = false;
|
||||
mockDevice->deviceInfo.platformLP = false;
|
||||
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, smallBufferPtr, 1 * MB));
|
||||
|
||||
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
|
||||
|
||||
// platform LP == false && size > 10 MB
|
||||
mockDevice->getDeviceInfoToModify()->platformLP = false;
|
||||
mockDevice->deviceInfo.platformLP = false;
|
||||
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, buffer->getCpuAddress(), largeBufferSize));
|
||||
|
||||
alignedFree(smallBufferPtr);
|
||||
@@ -198,7 +198,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, cpuCopyCriteriaNotMet) {
|
||||
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
|
||||
|
||||
// platform LP == true && size > 10 MB
|
||||
mockDevice->getDeviceInfoToModify()->platformLP = true;
|
||||
mockDevice->deviceInfo.platformLP = true;
|
||||
EXPECT_FALSE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, buffer->getCpuAddress(), largeBufferSize));
|
||||
|
||||
alignedFree(alignedHostPtr);
|
||||
|
||||
Reference in New Issue
Block a user