From dc0796c2a1f07e011dffac854cf2ed120c495866 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajewski Date: Tue, 11 Jul 2023 08:29:24 +0200 Subject: [PATCH] feature: Add cl_khr_spirv_linkonce_odr to supported extensions Related-To: NEO-8165 Signed-off-by: Andrzej Ratajewski --- opencl/test/unit_test/device/device_caps_tests.cpp | 2 ++ opencl/test/unit_test/platform/platform_tests.cpp | 1 + shared/source/helpers/compiler_product_helper_base.inl | 1 + 3 files changed, 4 insertions(+) diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index de934cd1f3..945fc2e981 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -541,6 +541,7 @@ TEST_F(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReport } EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_spirv_subgroups"))); + EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_spirv_linkonce_odr"))); EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_spirv_no_integer_wrap_decoration"))); } } @@ -590,6 +591,7 @@ TEST_F(DeviceGetCapsTest, givenOpenCLVersion12WhenCapsAreCreatedThenDeviceDoesnt EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_spirv_device_side_avc_motion_estimation"))); EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_spirv_subgroups"))); + EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_spirv_linkonce_odr"))); EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_spirv_no_integer_wrap_decoration"))); } diff --git a/opencl/test/unit_test/platform/platform_tests.cpp b/opencl/test/unit_test/platform/platform_tests.cpp index 8093c5180d..8f7b85eeff 100644 --- a/opencl/test/unit_test/platform/platform_tests.cpp +++ b/opencl/test/unit_test/platform/platform_tests.cpp @@ -321,6 +321,7 @@ TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatching } EXPECT_TRUE(hasSubstr(compilerExtensions, std::string("cl_intel_spirv_subgroups"))); + EXPECT_TRUE(hasSubstr(compilerExtensions, std::string("cl_khr_spirv_linkonce_odr"))); EXPECT_TRUE(hasSubstr(compilerExtensions, std::string("cl_khr_spirv_no_integer_wrap_decoration"))); } diff --git a/shared/source/helpers/compiler_product_helper_base.inl b/shared/source/helpers/compiler_product_helper_base.inl index 9e41db1871..610cac4814 100644 --- a/shared/source/helpers/compiler_product_helper_base.inl +++ b/shared/source/helpers/compiler_product_helper_base.inl @@ -96,6 +96,7 @@ std::string CompilerProductHelperHw::getDeviceExtensions(const Hardw extensions += "cl_intel_spirv_media_block_io "; } extensions += "cl_intel_spirv_subgroups "; + extensions += "cl_khr_spirv_linkonce_odr "; extensions += "cl_khr_spirv_no_integer_wrap_decoration "; extensions += "cl_intel_unified_shared_memory ";