Adjust tests to shared system memory support.

Change-Id: I894030ef673d60e31dae55141e60170ac92afc15
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-09-05 15:14:11 +02:00
committed by sys_ocldev
parent 882a216688
commit 06d4fa54f1
3 changed files with 7 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ class KernelArgSvmFixture : public api_fixture, public DeviceFixture {
pKernelInfo->kernelArgInfo[0].typeStr = "char *";
pKernelInfo->kernelArgInfo[0].addressQualifier = CL_KERNEL_ARG_ADDRESS_GLOBAL;
pMockKernel = new MockKernel(pProgram, *pKernelInfo, *pPlatform->getDevice(0));
pMockKernel = new MockKernel(pProgram, *pKernelInfo, *this->pDevice);
ASSERT_EQ(CL_SUCCESS, pMockKernel->initialize());
pMockKernel->setCrossThreadData(pCrossThreadData, sizeof(pCrossThreadData));
}

View File

@@ -1296,7 +1296,7 @@ TEST_F(BuiltInTests, createProgramFromCodeInternalOptionsFor32Bit) {
EXPECT_EQ(std::string::npos, it);
it = builtinInternalOptions.find("-cl-intel-greater-than-4GB-buffer-required");
if (is32bit) {
if (is32bit || pDevice->areSharedSystemAllocationsAllowed()) {
EXPECT_NE(std::string::npos, it);
} else {
EXPECT_EQ(std::string::npos, it);

View File

@@ -1795,7 +1795,11 @@ TEST_F(ProgramTests, ProgramCtorSetsProperInternalOptionsWhenForcing32BitAddress
} else {
EXPECT_THAT(program.getInternalOptions(), testing::HasSubstr(std::string("-ocl-version=000")));
}
EXPECT_THAT(program.getInternalOptions(), testing::Not(testing::HasSubstr(std::string("-cl-intel-greater-than-4GB-buffer-required"))));
if (pDevice->areSharedSystemAllocationsAllowed()) {
EXPECT_THAT(program.getInternalOptions(), testing::HasSubstr(std::string("-cl-intel-greater-than-4GB-buffer-required")));
} else {
EXPECT_THAT(program.getInternalOptions(), testing::Not(testing::HasSubstr(std::string("-cl-intel-greater-than-4GB-buffer-required"))));
}
} else {
EXPECT_NE(CL_DEVICE_NOT_FOUND, retVal);
}