From 068fed75123f327896123f9917c4de83e39c1cbc Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 23 Jan 2025 02:34:29 +0000 Subject: [PATCH] feature: add support for the cl_khr_expect_assume extensions Related-To: NEO-12696 Signed-off-by: Ben Ashbaugh --- opencl/test/unit_test/device/device_caps_tests.cpp | 9 ++++++++- shared/source/helpers/compiler_product_helper_base.inl | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 1fddda8841..7cb525660d 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -860,6 +860,13 @@ TEST_F(DeviceGetCapsTest, WhenDeviceIsCreatedThenCreateCommandQueueExtensionIsRe EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_create_command_queue"))); } +TEST_F(DeviceGetCapsTest, WhenDeviceIsCreatedThenExpectAssumeExtensionIsReported) { + auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + const auto &caps = device->getDeviceInfo(); + + EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_expect_assume"))); +} + TEST_F(DeviceGetCapsTest, WhenDeviceIsCreatedThenExtendedBitOpsExtensionIsReported) { auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); const auto &caps = device->getDeviceInfo(); diff --git a/shared/source/helpers/compiler_product_helper_base.inl b/shared/source/helpers/compiler_product_helper_base.inl index 12da31e692..357c28c578 100644 --- a/shared/source/helpers/compiler_product_helper_base.inl +++ b/shared/source/helpers/compiler_product_helper_base.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -85,6 +85,7 @@ std::string CompilerProductHelperHw::getDeviceExtensions(const Hardw "cl_khr_subgroup_shuffle_relative " "cl_khr_subgroup_clustered_reduce " "cl_intel_device_attribute_query " + "cl_khr_expect_assume " "cl_khr_extended_bit_ops " "cl_khr_suggested_local_work_size " "cl_intel_split_work_group_barrier ";