Minor cleanup in buffer ULTs

Change-Id: I5004cbcb7b001a878de96449457bf43db1b23164
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-10-15 11:06:10 +02:00
committed by sys_ocldev
parent bf3d57dd05
commit babbb1224f
2 changed files with 2 additions and 11 deletions

View File

@ -466,18 +466,12 @@ TEST_F(clCreateBufferTestsWithRestrictions, GivenMemoryManagerRestrictionsWhenMi
using clCreateBufferWithMultiDeviceContextTests = clCreateBufferTemplateTests;
static int cbInvoked = 0;
void CL_CALLBACK eventCallBack(const char *, const void *,
size_t, void *) {
cbInvoked++;
}
TEST_P(clCreateBufferWithMultiDeviceContextTests, GivenBufferCreatedWithContextdWithMultiDeviceThenGraphicsAllocationsAreProperlyFilled) {
UltClDeviceFactory deviceFactory{2, 0};
DebugManager.flags.EnableMultiRootDeviceContexts.set(true);
cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]};
auto context = clCreateContext(nullptr, 2u, devices, eventCallBack, nullptr, &retVal);
auto context = clCreateContext(nullptr, 2u, devices, nullptr, nullptr, &retVal);
EXPECT_NE(nullptr, context);
EXPECT_EQ(CL_SUCCESS, retVal);

View File

@ -1812,10 +1812,7 @@ using MultiRootDeviceBufferTest = MultiRootDeviceFixture;
TEST_F(MultiRootDeviceBufferTest, WhenCleanAllGraphicsAllocationsCalledThenGraphicsAllocationsAreProperlyRemoved) {
std::map<uint32_t, NEO::CreateBuffer::AllocationInfo> allocationInfo;
for (auto rootDeviceIndex = 1u; rootDeviceIndex < 2u; rootDeviceIndex++) {
allocationInfo.insert({rootDeviceIndex, {}});
}
allocationInfo.insert({1u, {}});
allocationInfo[1u].memory = mockMemoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{1u, MemoryConstants::pageSize});
Buffer::cleanAllGraphicsAllocations(*context, *context->getMemoryManager(), allocationInfo);