Correct setting il version

Related-To: NEO-4368

Change-Id: I78111e0c28318f85657ab3cb545d4a5948f7b3d3
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-05-15 11:16:52 +02:00
committed by sys_ocldev
parent c4c7d72aa5
commit 4f5c80c916
2 changed files with 16 additions and 11 deletions

View File

@ -911,14 +911,21 @@ TEST(DeviceGetCaps, givenOclVersionLessThan21WhenCapsAreCreatedThenDeviceReports
}
}
TEST(DeviceGetCaps, givenOclVersion21WhenCapsAreCreatedThenDeviceReportsSpirvAsSupportedIl) {
TEST(DeviceGetCaps, givenOcl21FeaturesSupportedWhenCapsAreCreatedThenDeviceReportsSpirvAsSupportedIl) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.ForceOCL21FeaturesSupport.set(1);
{
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
const auto &caps = device->getDeviceInfo();
EXPECT_STREQ("SPIR-V_1.2 ", caps.ilVersion);
}
DebugManager.flags.ForceOCL21FeaturesSupport.set(-1);
DebugManager.flags.ForceOCLVersion.set(21);
{
DebugManager.flags.ForceOCLVersion.set(21);
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
const auto &caps = device->getDeviceInfo();
EXPECT_STREQ("SPIR-V_1.2 ", caps.ilVersion);
DebugManager.flags.ForceOCLVersion.set(0);
}
}