Skip to content

Commit d135944

Browse files
Improving reporting VME extensions
Change-Id: Ia7ed2d1587603d8cfed391d8d5f7c1cd1faa1c21 Signed-off-by: Andrzej Koska <[email protected]> Related-To: NEO-4047
1 parent dded0aa commit d135944

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

runtime/device/device_caps.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ void Device::initializeCaps() {
127127
deviceInfo.independentForwardProgress = true;
128128
deviceExtensions += "cl_khr_subgroups ";
129129
deviceExtensions += "cl_khr_il_program ";
130-
deviceExtensions += "cl_intel_spirv_device_side_avc_motion_estimation ";
130+
if (supportsVme) {
131+
deviceExtensions += "cl_intel_spirv_device_side_avc_motion_estimation ";
132+
}
131133
deviceExtensions += "cl_intel_spirv_media_block_io ";
132134
deviceExtensions += "cl_intel_spirv_subgroups ";
133135
deviceExtensions += "cl_khr_spirv_no_integer_wrap_decoration ";

runtime/platform/extensions.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ std::string getExtensionsList(const HardwareInfo &hwInfo) {
4343
if (hwInfo.capabilityTable.clVersionSupport >= 21) {
4444
allExtensionsList += "cl_khr_subgroups ";
4545
allExtensionsList += "cl_khr_il_program ";
46-
allExtensionsList += "cl_intel_spirv_device_side_avc_motion_estimation ";
46+
if (hwInfo.capabilityTable.supportsVme) {
47+
allExtensionsList += "cl_intel_spirv_device_side_avc_motion_estimation ";
48+
}
4749
allExtensionsList += "cl_intel_spirv_media_block_io ";
4850
allExtensionsList += "cl_intel_spirv_subgroups ";
4951
allExtensionsList += "cl_khr_spirv_no_integer_wrap_decoration ";

unit_tests/device/device_caps_tests.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,13 @@ TEST_F(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReport
406406
DebugManager.flags.ForceOCLVersion.set(21);
407407
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
408408
const auto &caps = device->getDeviceInfo();
409+
const HardwareInfo *hwInfo = platformDevices[0];
409410

410-
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
411+
if (hwInfo->capabilityTable.supportsVme) {
412+
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
413+
} else {
414+
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation"))));
415+
}
411416
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
412417
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_subgroups")));
413418
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_spirv_no_integer_wrap_decoration")));

unit_tests/platform/platform_tests.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,11 @@ TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatching
243243
if (hwInfo->capabilityTable.clVersionSupport > 20) {
244244
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_subgroups")));
245245
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_il_program")));
246-
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
246+
if (hwInfo->capabilityTable.supportsVme) {
247+
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
248+
} else {
249+
EXPECT_THAT(compilerExtensions, testing::Not(::testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation"))));
250+
}
247251
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
248252
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_intel_spirv_subgroups")));
249253
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_spirv_no_integer_wrap_decoration")));

0 commit comments

Comments
 (0)