mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Add ClDevice function to query OCL2.1 support
Change-Id: I4a1e7def6b26241592dba4ecd4a6a6cb3bb69835 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1dad22a12a
commit
c3ea485752
@@ -88,7 +88,7 @@ TEST_F(clCreateProgramWithILTests, GivenContextWithDevicesThatDontSupportILWhenC
|
||||
cl_int err = CL_SUCCESS;
|
||||
const uint32_t spirv[16] = {0x03022307};
|
||||
cl_program prog = clCreateProgramWithIL(pContext, spirv, sizeof(spirv), &err);
|
||||
if (pContext->getDevice(0)->getEnabledClVersion() >= 21) {
|
||||
if (pContext->getDevice(0)->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(CL_SUCCESS, err);
|
||||
EXPECT_NE(nullptr, prog);
|
||||
clReleaseProgram(prog);
|
||||
|
||||
@@ -243,7 +243,7 @@ TEST_F(clGetDeviceInfoTests, GivenClDeviceIlVersionParamAndOcl21WhenGettingDevic
|
||||
|
||||
ClDevice *pDevice = castToObject<ClDevice>(testedClDevice);
|
||||
|
||||
if (pDevice->getSupportedClVersion() < 21)
|
||||
if (pDevice->areOcl21FeaturesEnabled() == false)
|
||||
return;
|
||||
|
||||
cl_int retVal = clGetDeviceInfo(
|
||||
|
||||
@@ -66,9 +66,6 @@ TEST_P(clGetPlatformInfoParameterizedTests, GivenClPlatformVersionWhenGettingPla
|
||||
case 21:
|
||||
deviceVer = "OpenCL 2.1 ";
|
||||
break;
|
||||
case 20:
|
||||
deviceVer = "OpenCL 2.0 ";
|
||||
break;
|
||||
case 12:
|
||||
default:
|
||||
deviceVer = "OpenCL 1.2 ";
|
||||
@@ -79,7 +76,7 @@ TEST_P(clGetPlatformInfoParameterizedTests, GivenClPlatformVersionWhenGettingPla
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(OCLVersions,
|
||||
clGetPlatformInfoParameterizedTests,
|
||||
::testing::Values(12, 20, 21));
|
||||
::testing::Values(12, 21));
|
||||
|
||||
TEST_F(clGetPlatformInfoTests, GivenClPlatformNameWhenGettingPlatformInfoStringThenCorrectStringIsReturned) {
|
||||
paramValue = getPlatformInfoString(pPlatform, CL_PLATFORM_NAME);
|
||||
|
||||
@@ -93,7 +93,7 @@ TEST(clGetSupportedImageFormatsTest, givenPlatformNotSupportingReadWriteImagesWh
|
||||
&numImageFormats);
|
||||
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
if (context->getDevice(0)->getEnabledClVersion() >= 20) {
|
||||
if (context->getDevice(0)->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_GT(numImageFormats, 0u);
|
||||
} else {
|
||||
EXPECT_EQ(0u, numImageFormats);
|
||||
|
||||
@@ -913,7 +913,7 @@ TEST_F(BuiltInTests, BuiltinDispatchInfoBuilderGetBuilderForUnknownBuiltInOp) {
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, BuiltInTests, getSchedulerKernel) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
SchedulerKernel &schedulerKernel = pContext->getSchedulerKernel();
|
||||
std::string name = SchedulerKernel::schedulerName;
|
||||
EXPECT_EQ(name, schedulerKernel.getKernelInfo().name);
|
||||
@@ -921,7 +921,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, BuiltInTests, getSchedulerKernel) {
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, BuiltInTests, getSchedulerKernelForSecondTimeDoesNotCreateNewKernel) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
SchedulerKernel &schedulerKernel = pContext->getSchedulerKernel();
|
||||
|
||||
Program *program = schedulerKernel.getProgram();
|
||||
|
||||
@@ -651,7 +651,7 @@ HWTEST_F(EnqueueKernelTest, givenEnqueueWithGlobalWorkSizeWhenZeroValueIsPassedI
|
||||
size_t gws[3] = {0, 0, 0};
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
auto ret = pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
auto expected = (pClDevice->getEnabledClVersion() < 21 ? CL_INVALID_GLOBAL_WORK_SIZE : CL_SUCCESS);
|
||||
auto expected = (pClDevice->areOcl21FeaturesEnabled() == false ? CL_INVALID_GLOBAL_WORK_SIZE : CL_SUCCESS);
|
||||
EXPECT_EQ(expected, ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -904,7 +904,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueKernelTest, givenCacheFlushAfterWalkerEnabled
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueAuxKernelTests, givenParentKernelWhenAuxTranslationIsRequiredThenMakeEnqueueBlocking) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MyCmdQ<FamilyType> cmdQ(context, pClDevice);
|
||||
size_t gws[3] = {1, 0, 0};
|
||||
|
||||
@@ -926,7 +926,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueAuxKernelTests, givenParentKernelWhenAuxTrans
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueAuxKernelTests, givenParentKernelButNoDeviceQueueWhenEnqueueIsCalledItReturnsInvalidOperation) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MyCmdQ<FamilyType> cmdQ(context, pClDevice);
|
||||
size_t gws[3] = {1, 0, 0};
|
||||
|
||||
|
||||
@@ -61,8 +61,9 @@ class ZeroSizeEnqueueHandlerTestZeroGws : public ZeroSizeEnqueueHandlerTest {
|
||||
std::tuple<unsigned int, size_t *> testGwsInputs[14];
|
||||
};
|
||||
|
||||
HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndOpenClAtLeast21WhenEnqueingKernelThenCommandMarkerShouldBeEnqueued) {
|
||||
HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndOpenClIs21WhenEnqueingKernelThenCommandMarkerShouldBeEnqueued) {
|
||||
pClDevice->enabledClVersion = 21;
|
||||
pClDevice->ocl21FeaturesEnabled = true;
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||
|
||||
@@ -79,24 +80,22 @@ HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndOpe
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndOpenClIs20OrOlderWhenEnqueingKernelThenErrorIsReturned) {
|
||||
int oclVersionsToTest[] = {12, 20};
|
||||
for (auto oclVersion : oclVersionsToTest) {
|
||||
pClDevice->enabledClVersion = oclVersion;
|
||||
HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndOpenClIs12WhenEnqueingKernelThenErrorIsReturned) {
|
||||
pClDevice->enabledClVersion = 12;
|
||||
pClDevice->ocl21FeaturesEnabled = false;
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
||||
for (auto testInput : testGwsInputs) {
|
||||
auto workDim = std::get<0>(testInput);
|
||||
auto gws = std::get<1>(testInput);
|
||||
mockCmdQ->lastCommandType = static_cast<cl_command_type>(CL_COMMAND_COPY_BUFFER);
|
||||
for (auto testInput : testGwsInputs) {
|
||||
auto workDim = std::get<0>(testInput);
|
||||
auto gws = std::get<1>(testInput);
|
||||
mockCmdQ->lastCommandType = static_cast<cl_command_type>(CL_COMMAND_COPY_BUFFER);
|
||||
|
||||
retVal = mockCmdQ->enqueueKernel(mockKernel.mockKernel, workDim, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_INVALID_GLOBAL_WORK_SIZE, retVal);
|
||||
EXPECT_EQ(static_cast<cl_command_type>(CL_COMMAND_COPY_BUFFER), mockCmdQ->lastCommandType);
|
||||
}
|
||||
retVal = mockCmdQ->enqueueKernel(mockKernel.mockKernel, workDim, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_INVALID_GLOBAL_WORK_SIZE, retVal);
|
||||
EXPECT_EQ(static_cast<cl_command_type>(CL_COMMAND_COPY_BUFFER), mockCmdQ->lastCommandType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,12 +110,12 @@ HWTEST_F(ZeroSizeEnqueueHandlerTestZeroGws, GivenZeroSizeEnqueueIsDetectedAndLoc
|
||||
size_t lws[1] = {1};
|
||||
|
||||
EXPECT_NO_THROW(retVal = mockCmdQ->enqueueKernel(mockKernel.mockKernel, workDim, nullptr, gws, lws, 0, nullptr, nullptr));
|
||||
auto expected = (pClDevice->getEnabledClVersion() < 21 ? CL_INVALID_GLOBAL_WORK_SIZE : CL_SUCCESS);
|
||||
auto expected = (pClDevice->areOcl21FeaturesEnabled() == false ? CL_INVALID_GLOBAL_WORK_SIZE : CL_SUCCESS);
|
||||
EXPECT_EQ(expected, retVal);
|
||||
}
|
||||
|
||||
HWTEST_F(ZeroSizeEnqueueHandlerTest, GivenZeroSizeEnqueueIsDetectedWhenEnqueingKernelThenEventCommandTypeShoudBeUnchanged) {
|
||||
if (pClDevice->getEnabledClVersion() < 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled() == false) {
|
||||
return;
|
||||
}
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||
|
||||
@@ -97,7 +97,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
|
||||
|
||||
EXPECT_LE(128u, sharedCaps.maxReadImageArgs);
|
||||
EXPECT_LE(128u, sharedCaps.maxWriteImageArgs);
|
||||
if (device->getEnabledClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(128u, caps.maxReadWriteImageArgs);
|
||||
} else {
|
||||
EXPECT_EQ(0u, caps.maxReadWriteImageArgs);
|
||||
@@ -256,38 +256,38 @@ TEST_F(DeviceGetCapsTest, givenDeviceWithMidThreadPreemptionWhenDeviceIsCreatedT
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceOclVersion21WhenCapsAreCreatedThenDeviceReportsOpenCL21) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
{
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 2.1 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 2.0 ", caps.clCVersion);
|
||||
DebugManager.flags.ForceOCLVersion.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceOclVersion20WhenCapsAreCreatedThenDeviceReportsOpenCL20) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
{
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 2.0 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 2.0 ", caps.clCVersion);
|
||||
DebugManager.flags.ForceOCLVersion.set(0);
|
||||
}
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 2.1 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 2.0 ", caps.clCVersion);
|
||||
EXPECT_TRUE(device->ocl21FeaturesEnabled);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceOclVersion12WhenCapsAreCreatedThenDeviceReportsOpenCL12) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
{
|
||||
DebugManager.flags.ForceOCLVersion.set(12);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 1.2 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
|
||||
DebugManager.flags.ForceOCLVersion.set(0);
|
||||
}
|
||||
DebugManager.flags.ForceOCLVersion.set(12);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 1.2 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
|
||||
EXPECT_FALSE(device->ocl21FeaturesEnabled);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceOCL21FeaturesSupportEnabledWhenCapsAreCreatedThenDeviceReportsSupportOfOcl21Features) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(12);
|
||||
DebugManager.flags.ForceOCL21FeaturesSupport.set(1);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
EXPECT_TRUE(device->ocl21FeaturesEnabled);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceOCL21FeaturesSupportDisabledWhenCapsAreCreatedThenDeviceReportsNoSupportOfOcl21Features) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
DebugManager.flags.ForceOCL21FeaturesSupport.set(0);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
EXPECT_FALSE(device->ocl21FeaturesEnabled);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenForceInvalidOclVersionWhenCapsAreCreatedThenDeviceWillDefaultToOpenCL12) {
|
||||
@@ -335,8 +335,8 @@ TEST_F(DeviceGetCapsTest, Given32bitAddressingWhenDeviceIsCreatedThenGlobalMemSi
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &sharedCaps = device->getSharedDeviceInfo();
|
||||
auto pMemManager = device->getMemoryManager();
|
||||
unsigned int enabledCLVer = device->getEnabledClVersion();
|
||||
bool addressing32Bit = is32bit || (is64bit && (enabledCLVer < 20)) || DebugManager.flags.Force32bitAddressing.get();
|
||||
auto enabledOcl21Features = device->areOcl21FeaturesEnabled();
|
||||
bool addressing32Bit = is32bit || (is64bit && (enabledOcl21Features == false)) || DebugManager.flags.Force32bitAddressing.get();
|
||||
|
||||
cl_ulong sharedMem = (cl_ulong)pMemManager->getSystemSharedMemory(0u);
|
||||
cl_ulong maxAppAddrSpace = (cl_ulong)pMemManager->getMaxApplicationAddress() + 1ULL;
|
||||
@@ -357,8 +357,8 @@ TEST_F(DeviceGetCapsTest, givenDeviceCapsWhenLocalMemoryIsEnabledThenCalculateGl
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &sharedCaps = device->getSharedDeviceInfo();
|
||||
auto pMemManager = device->getMemoryManager();
|
||||
auto enabledCLVer = device->getEnabledClVersion();
|
||||
bool addressing32Bit = is32bit || (is64bit && (enabledCLVer < 20)) || DebugManager.flags.Force32bitAddressing.get();
|
||||
auto enabledOcl21Features = device->areOcl21FeaturesEnabled();
|
||||
bool addressing32Bit = is32bit || (is64bit && (enabledOcl21Features == false)) || DebugManager.flags.Force32bitAddressing.get();
|
||||
|
||||
auto localMem = pMemManager->getLocalMemorySize(0u);
|
||||
auto maxAppAddrSpace = pMemManager->getMaxApplicationAddress() + 1;
|
||||
@@ -750,9 +750,9 @@ TEST_F(DeviceGetCapsTest, GivenAnyDeviceWhenCheckingExtensionsThenSupportSubgrou
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroups_long")));
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenAtleastOCL2DeviceThenExposesMipMapAndUnifiedMemoryExtensions) {
|
||||
TEST_F(DeviceGetCapsTest, givenAtleastOCL21DeviceThenExposesMipMapAndUnifiedMemoryExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@@ -769,7 +769,7 @@ TEST_F(DeviceGetCapsTest, givenAtleastOCL2DeviceThenExposesMipMapAndUnifiedMemor
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsMinMapExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
@@ -39,8 +39,8 @@ TEST_F(DeviceTest, WhenDeviceIsCreatedThenCommandStreamReceiverIsNotNull) {
|
||||
EXPECT_NE(nullptr, &pDevice->getGpgpuCommandStreamReceiver());
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenDeviceIsCreatedThenSupportedClVersionMatchesHardwareInfo) {
|
||||
auto version = pClDevice->getSupportedClVersion();
|
||||
TEST_F(DeviceTest, WhenDeviceIsCreatedThenEnabledClVersionMatchesHardwareInfo) {
|
||||
auto version = pClDevice->getEnabledClVersion();
|
||||
auto version2 = pDevice->getHardwareInfo().capabilityTable.clVersionSupport;
|
||||
|
||||
EXPECT_EQ(version, version2);
|
||||
|
||||
@@ -488,7 +488,7 @@ TEST(GetDeviceInfo, GivenMaxGlobalVariableSizeWhenGettingDeviceInfoThenCorrectVa
|
||||
auto retVal = device->getDeviceInfo(CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, sizeof(size_t), &value, &size);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(sizeof(size_t), size);
|
||||
if (device->getEnabledClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(value, 65536u);
|
||||
} else {
|
||||
EXPECT_EQ(value, 0u);
|
||||
@@ -504,7 +504,7 @@ TEST(GetDeviceInfo, GivenGlobalVariablePreferredTotalSizeWhenGettingDeviceInfoTh
|
||||
auto retVal = device->getDeviceInfo(CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, sizeof(size_t), &value, &size);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(sizeof(size_t), size);
|
||||
if (device->getEnabledClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(value, static_cast<size_t>(device->getSharedDeviceInfo().maxMemAllocSize));
|
||||
} else {
|
||||
EXPECT_EQ(value, 0u);
|
||||
|
||||
@@ -124,7 +124,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlockKernelWithPrivateSurfaceWhenParentKernelIsEnqueuedThenPrivateSurfaceIsMadeResident) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t executionStamp = 0;
|
||||
@@ -155,7 +155,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlockKernelWithPrivate
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlocksWithPrivateMemoryWhenEnqueueKernelThatIsBlockedByUserEventIsCalledThenPrivateAllocationIsMadeResidentWhenEventUnblocks) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
|
||||
@@ -192,7 +192,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlocksWithPrivateMemor
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenParentKernelWithBlocksWhenEnqueueKernelIsCalledThenBlockKernelIsaAllocationIsMadeResident) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
|
||||
@@ -210,7 +210,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenParentKernelWithBlocks
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlockKernelManagerFilledWithBlocksWhenMakeInternalAllocationsResidentIsCalledThenAllSurfacesAreMadeResident) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
auto blockKernelManager = pKernel->getProgram()->getBlockKernelManager();
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.storeMakeResidentAllocations = true;
|
||||
@@ -225,7 +225,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlockKernelManagerFill
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenParentKernelWithBlocksWhenEnqueueKernelThatIsBlockedByUserEventIsCalledThenBlockKernelIsaAllocationIsMadeResidentWhenEventUnblocks) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
|
||||
@@ -455,7 +455,7 @@ class ParentKernelEnqueueFixture : public ExecutionModelSchedulerTest,
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnqueuedTheDefaultDeviceQueueAndEventPoolIsPatched) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
|
||||
@@ -481,7 +481,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnqueuedThenBlocksDSHOnReflectionSurfaceArePatchedWithDeviceQueueAndEventPoolAddresses) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
@@ -521,7 +521,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnqueuedToNonBlockedQueueThenDeviceQueueCriticalSetionIsAcquired) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
@@ -536,7 +536,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnqueuedToBlockedQueueThenDeviceQueueCriticalSetionIsNotAcquired) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
@@ -555,7 +555,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedToNonBlockedQueueFlushesCSRWithSLM) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t execStamp;
|
||||
@@ -570,7 +570,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedToNo
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedWithSchedulerReturnInstanceRunsSimulation) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SchedulerSimulationReturnInstance.set(1);
|
||||
@@ -599,7 +599,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedWith
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, givenCsrInBatchingModeWhenExecutionModelKernelIsSubmittedThenItIsFlushed) {
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
@@ -622,7 +622,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, givenCsrInBatchingModeWh
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueueMarksCSRMediaVFEStateDirty) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t execStamp;
|
||||
|
||||
@@ -201,7 +201,7 @@ typedef ParentKernelCommandQueueFixture ParentKernelCommandStreamFixture;
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandStreamFixture, GivenDispatchInfoWithParentKernelWhenCommandStreamIsAcquiredThenSizeAccountsForSchedulerDispatch) {
|
||||
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
|
||||
|
||||
DispatchInfo dispatchInfo(mockParentKernel, 1, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{0, 0, 0});
|
||||
@@ -261,7 +261,7 @@ class MockParentKernelDispatch : public ExecutionModelSchedulerTest,
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenBlockedQueueWhenParentKernelIsDispatchedThenDshHeapForIndirectObjectHeapIsUsed) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
|
||||
|
||||
auto blockedCommandsData = createBlockedCommandsData(*pCmdQ);
|
||||
@@ -293,7 +293,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenParentKernelWhenDispa
|
||||
typedef typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
||||
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
|
||||
|
||||
KernelOperation *blockedCommandsData = nullptr;
|
||||
@@ -338,7 +338,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenParentKernelWhenDispa
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenUsedSSHHeapWhenParentKernelIsDispatchedThenNewSSHIsAllocated) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
|
||||
|
||||
KernelOperation *blockedCommandsData = nullptr;
|
||||
@@ -379,7 +379,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenUsedSSHHeapWhenParent
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenNotUsedSSHHeapWhenParentKernelIsDispatchedThenExistingSSHIsUsed) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
|
||||
|
||||
KernelOperation *blockedCommandsData = nullptr;
|
||||
|
||||
@@ -43,7 +43,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
SchedulerKernel &scheduler = context->getSchedulerKernel();
|
||||
|
||||
@@ -172,7 +172,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe
|
||||
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
SchedulerKernel &scheduler = context->getSchedulerKernel();
|
||||
|
||||
@@ -201,7 +201,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWithEarlyReturnSetToFirstInstanceDoesNotPutBBStartCmd) {
|
||||
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -241,7 +241,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWi
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, ForceDispatchSchedulerEnqueuesSchedulerKernel) {
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
|
||||
DebugManager.flags.ForceDispatchScheduler.set(true);
|
||||
|
||||
@@ -76,7 +76,7 @@ class MockDeviceQueueHwWithCriticalSectionRelease : public DeviceQueueHw<GfxFami
|
||||
};
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenLockedEMcritcalSectionWhenParentKernelCommandIsSubmittedThenItWaitsForcriticalSectionReleasement) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -116,7 +116,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenLockedEMcritca
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenPassedDshIsUsed) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -179,7 +179,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenIndirectStateAndEMCleanupSectionIsSetup) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -219,7 +219,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentKernelWithProfilingWhenCommandIsSubmittedThenEMCleanupSectionsSetsCompleteTimestamp) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -259,7 +259,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentK
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenSchedulerIsDispatched) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -297,7 +297,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQueueHeapshenParentKernelIsSubmittedThenQueueHeapsAreNotUsed) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -351,7 +351,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQue
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhenParentKernelIsSubmittedThenExistingSSHIsUsed) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
@@ -398,7 +398,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhen
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedCommandQueueWhenDispatchWalkerIsCalledThenHeapsHaveProperSizes) {
|
||||
if (device->getSupportedClVersion() >= 20) {
|
||||
if (device->areOcl21FeaturesSupported()) {
|
||||
cl_queue_properties properties[3] = {0};
|
||||
std::unique_ptr<MockParentKernel> parentKernel(MockParentKernel::create(*context));
|
||||
|
||||
|
||||
@@ -50,9 +50,8 @@ struct HelloWorldKernelFixture : public ProgramFixture {
|
||||
|
||||
if (options) {
|
||||
std::string optionsToProgram(options);
|
||||
|
||||
if (optionsToProgram.find("-cl-std=CL2.0") != std::string::npos) {
|
||||
ASSERT_TRUE(pDevice->getSupportedClVersion() >= 20u);
|
||||
ASSERT_TRUE(pDevice->areOcl21FeaturesEnabled());
|
||||
}
|
||||
|
||||
CreateProgramFromBinary(
|
||||
|
||||
@@ -78,7 +78,7 @@ GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenSubgroupLocalBlock
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, ::testing::Not(testing::HasSubstr(std::string("cl_khr_subgroups"))));
|
||||
@@ -88,7 +88,7 @@ GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenDeviceProperlyRepo
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
|
||||
@@ -24,6 +24,6 @@ struct BdwDeviceTest : public DeviceFixture,
|
||||
};
|
||||
|
||||
BDWTEST_F(BdwDeviceTest, givenBdwDeviceWhenAskedForClVersionThenReport21) {
|
||||
auto version = pClDevice->getSupportedClVersion();
|
||||
auto version = pClDevice->getEnabledClVersion();
|
||||
EXPECT_EQ(21u, version);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta
|
||||
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
if (pClDevice->getSupportedClVersion() >= 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
SchedulerKernel &scheduler = context->getSchedulerKernel();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ GEN8TEST_F(Gen8DeviceCaps, defaultPreemptionMode) {
|
||||
|
||||
GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, ::testing::Not(testing::HasSubstr(std::string("cl_khr_subgroups"))));
|
||||
@@ -30,7 +30,7 @@ GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckExtensionsThenDeviceProperlyReports
|
||||
GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
|
||||
@@ -12,8 +12,8 @@ using namespace NEO;
|
||||
|
||||
typedef Test<DeviceFixture> DeviceTest;
|
||||
|
||||
BXTTEST_F(DeviceTest, getSupportedClVersion12Device) {
|
||||
auto version = pClDevice->getSupportedClVersion();
|
||||
BXTTEST_F(DeviceTest, getEnabledClVersion12Device) {
|
||||
auto version = pClDevice->getEnabledClVersion();
|
||||
EXPECT_EQ(12u, version);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ using namespace NEO;
|
||||
|
||||
typedef Test<DeviceFixture> DeviceTest;
|
||||
|
||||
SKLTEST_F(DeviceTest, getSupportedClVersion21Device) {
|
||||
auto version = pClDevice->getSupportedClVersion();
|
||||
SKLTEST_F(DeviceTest, getEnabledClVersion21Device) {
|
||||
auto version = pClDevice->getEnabledClVersion();
|
||||
EXPECT_EQ(21u, version);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ GEN9TEST_F(Gen9DeviceCaps, skuSpecificCaps) {
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, ::testing::Not(testing::HasSubstr(std::string("cl_khr_subgroups"))));
|
||||
@@ -38,7 +38,7 @@ GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckExtensionsThenDeviceProperlyReports
|
||||
GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->getEnabledClVersion() >= 21) {
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
|
||||
@@ -1363,7 +1363,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelEventPoolSurfaceTest, givenStatelessKernelWhen
|
||||
pKernelInfo->requiresSshForBuffers = false;
|
||||
|
||||
ASSERT_EQ(CL_SUCCESS, pKernel->initialize());
|
||||
if (pClDevice->getSupportedClVersion() < 20) {
|
||||
if (pClDevice->areOcl21FeaturesSupported() == false) {
|
||||
EXPECT_EQ(0u, pKernel->getSurfaceStateHeapSize());
|
||||
} else {
|
||||
}
|
||||
|
||||
@@ -20,3 +20,7 @@ MockClDevice::MockClDevice(MockDevice *pMockDevice)
|
||||
executionEnvironment(pMockDevice->executionEnvironment), mockMemoryManager(pMockDevice->mockMemoryManager),
|
||||
engines(pMockDevice->engines) {
|
||||
}
|
||||
|
||||
bool MockClDevice::areOcl21FeaturesSupported() const {
|
||||
return device.getHardwareInfo().capabilityTable.supportsOcl21Features;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ class MockClDevice : public ClDevice {
|
||||
using ClDevice::enabledClVersion;
|
||||
using ClDevice::initializeCaps;
|
||||
using ClDevice::name;
|
||||
using ClDevice::ocl21FeaturesEnabled;
|
||||
using ClDevice::simultaneousInterops;
|
||||
using ClDevice::subDevices;
|
||||
|
||||
@@ -70,6 +71,8 @@ class MockClDevice : public ClDevice {
|
||||
std::unique_ptr<CommandStreamReceiver> createCommandStreamReceiver() const { return device.createCommandStreamReceiver(); }
|
||||
BuiltIns *getBuiltIns() const { return getDevice().getBuiltIns(); }
|
||||
|
||||
bool areOcl21FeaturesSupported() const;
|
||||
|
||||
void setDebuggerActive(bool active) {
|
||||
sharedDeviceInfo.debuggerActive = active;
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ TEST_P(ProgramFromBinaryTest, GivenGlobalVariableTotalSizeSetWhenGettingBuildGlo
|
||||
¶mValueSizeRet);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(paramValueSizeRet, sizeof(globalVarSize));
|
||||
if (castToObject<ClDevice>(pClDevice)->getEnabledClVersion() >= 20) {
|
||||
if (castToObject<ClDevice>(pClDevice)->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(globalVarSize, 1024u);
|
||||
} else {
|
||||
EXPECT_EQ(globalVarSize, 0u);
|
||||
|
||||
@@ -143,6 +143,7 @@ ForceFineGrainedSVMSupport = -1
|
||||
ForceSystemMemoryPlacement = 0
|
||||
ForceNonSystemMemoryPlacement = 0
|
||||
ForceOCLVersion = 0
|
||||
ForceOCL21FeaturesSupport = -1
|
||||
ForcePreemptionMode = -1
|
||||
ForceKernelPreemptionMode = -1
|
||||
NodeOrdinal = -1
|
||||
|
||||
@@ -24,7 +24,7 @@ bool TestChecks::supportsImages(const Context *pContext) {
|
||||
}
|
||||
|
||||
bool TestChecks::supportsOcl21(const Context *pContext) {
|
||||
return pContext->getDevice(0)->getEnabledClVersion() >= 21;
|
||||
return pContext->getDevice(0)->areOcl21FeaturesEnabled();
|
||||
}
|
||||
|
||||
bool TestChecks::supportsDeviceEnqueue(const ClDevice *pClDevice) {
|
||||
|
||||
Reference in New Issue
Block a user