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:
Filip Hazubski
2020-05-05 16:40:31 +02:00
committed by sys_ocldev
parent 1dad22a12a
commit c3ea485752
39 changed files with 136 additions and 139 deletions

View File

@ -24,6 +24,6 @@ struct BdwDeviceTest : public DeviceFixture,
};
BDWTEST_F(BdwDeviceTest, givenBdwDeviceWhenAskedForClVersionThenReport21) {
auto version = pClDevice->getSupportedClVersion();
auto version = pClDevice->getEnabledClVersion();
EXPECT_EQ(21u, version);
}

View File

@ -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();

View File

@ -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);