Skip to content

Commit 6813497

Browse files
Expose unified shared memory extension.
-Available only when device already supports OpenCL 2.0 Related-To: NEO-3148 Change-Id: Ie2bce908c5e49666d5a18c4b0eb21ff39a3e5a68 Signed-off-by: Mrozek, Michal <[email protected]>
1 parent ba9c21c commit 6813497

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

runtime/device/device_caps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void Device::initializeCaps() {
135135
}
136136

137137
if (enabledClVersion >= 20) {
138-
deviceExtensions += "cl_khr_mipmap_image cl_khr_mipmap_image_writes ";
138+
deviceExtensions += "cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_unified_shared_memory ";
139139
}
140140

141141
if (DebugManager.flags.EnableNV12.get()) {

unit_tests/device/device_caps_tests.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ TEST(Device_GetCaps, deviceReportsThrottleHintsExtension) {
625625
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_throttle_hints")));
626626
}
627627

628-
TEST(Device_GetCaps, givenAtleastOCL2DeviceThenExposesMipmapImageExtensions) {
628+
TEST(Device_GetCaps, givenAtleastOCL2DeviceThenExposesMipMapAndUnifiedMemoryExtensions) {
629629
DebugManagerStateRestore dbgRestorer;
630630
DebugManager.flags.ForceOCLVersion.set(20);
631631

@@ -634,9 +634,10 @@ TEST(Device_GetCaps, givenAtleastOCL2DeviceThenExposesMipmapImageExtensions) {
634634

635635
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_mipmap_image")));
636636
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_mipmap_image_writes")));
637+
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_unified_shared_memory")));
637638
}
638639

639-
TEST(Device_GetCaps, givenOCL12DeviceThenDoesNotExposeMipmapImageExtensions) {
640+
TEST(Device_GetCaps, givenOCL12DeviceThenDoesNotExposesMipMapAndUnifiedMemoryExtensions) {
640641
DebugManagerStateRestore dbgRestorer;
641642
DebugManager.flags.ForceOCLVersion.set(12);
642643

@@ -645,6 +646,7 @@ TEST(Device_GetCaps, givenOCL12DeviceThenDoesNotExposeMipmapImageExtensions) {
645646

646647
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_khr_mipmap_image"))));
647648
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_khr_mipmap_image_writes"))));
649+
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_unified_shared_memory"))));
648650
}
649651

650652
TEST(Device_GetCaps, givenDeviceThatDoesntHaveFp64ThenExtensionIsNotReported) {

0 commit comments

Comments
 (0)