Author: Wenju He Date: 2026-02-25T17:03:30+08:00 New Revision: a7cfc675ac7444bb557ef48fc1bcc788d42d1ac9
URL: https://github.com/llvm/llvm-project/commit/a7cfc675ac7444bb557ef48fc1bcc788d42d1ac9 DIFF: https://github.com/llvm/llvm-project/commit/a7cfc675ac7444bb557ef48fc1bcc788d42d1ac9.diff LOG: [OpenCL] Set intel extensions minimum version to OpenCL 1.0 (#176854) Motivation is similar to b12e070b9238. Following intel extensions are changed: cl_intel_required_subgroup_size cl_intel_subgroups cl_intel_subgroups_char cl_intel_subgroups_long cl_intel_subgroups_short cl_intel_subgroup_buffer_prefetch cl_intel_subgroup_local_block_io cl_intel_device_side_avc_motion_estimation Relates to https://github.com/KhronosGroup/OpenCL-CTS/pull/2376. Added: Modified: clang/include/clang/Basic/OpenCLExtensions.def clang/test/SemaOpenCL/extension-version.cl Removed: ################################################################################ diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def index 8113cdb44f367..89df344cbf715 100644 --- a/clang/include/clang/Basic/OpenCLExtensions.def +++ b/clang/include/clang/Basic/OpenCLExtensions.def @@ -141,14 +141,14 @@ OPENCL_EXTENSION(cl_amd_media_ops2, true, 100) // Intel OpenCL extensions OPENCL_EXTENSION(cl_intel_bfloat16_conversions, false, 100) -OPENCL_EXTENSION(cl_intel_required_subgroup_size, false, 200) -OPENCL_EXTENSION(cl_intel_subgroups, true, 120) -OPENCL_EXTENSION(cl_intel_subgroups_char, true, 120) -OPENCL_EXTENSION(cl_intel_subgroups_long, true, 120) -OPENCL_EXTENSION(cl_intel_subgroups_short, true, 120) -OPENCL_EXTENSION(cl_intel_subgroup_buffer_prefetch, false, 120) -OPENCL_EXTENSION(cl_intel_subgroup_local_block_io, false, 120) -OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 120) +OPENCL_EXTENSION(cl_intel_required_subgroup_size, false, 100) +OPENCL_EXTENSION(cl_intel_subgroups, true, 100) +OPENCL_EXTENSION(cl_intel_subgroups_char, true, 100) +OPENCL_EXTENSION(cl_intel_subgroups_long, true, 100) +OPENCL_EXTENSION(cl_intel_subgroups_short, true, 100) +OPENCL_EXTENSION(cl_intel_subgroup_buffer_prefetch, false, 100) +OPENCL_EXTENSION(cl_intel_subgroup_local_block_io, false, 100) +OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 100) // OpenCL C 3.0 features (6.2.1. Features) OPENCL_OPTIONALCOREFEATURE(__opencl_c_3d_image_writes, false, 300, OCL_C_30) diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl index 1dd3839a5c603..6e8cf5f0265e4 100644 --- a/clang/test/SemaOpenCL/extension-version.cl +++ b/clang/test/SemaOpenCL/extension-version.cl @@ -348,7 +348,7 @@ #endif #pragma OPENCL EXTENSION cl_khr_depth_images : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 100) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_bfloat16_conversions #error "Missing cl_intel_bfloat16_conversions define" #endif @@ -360,7 +360,7 @@ // expected-warning@+1{{OpenCL extension 'cl_intel_bfloat16_conversions' unknown or does not require pragma - ignoring}} #pragma OPENCL EXTENSION cl_intel_bfloat16_conversions : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_required_subgroup_size #error "Missing cl_intel_required_subgroup_size define" #endif @@ -372,7 +372,7 @@ // expected-warning@+1{{OpenCL extension 'cl_intel_required_subgroup_size' unknown or does not require pragma - ignoring}} #pragma OPENCL EXTENSION cl_intel_required_subgroup_size : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroups #error "Missing cl_intel_subgroups define" #endif @@ -384,7 +384,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroups_char #error "Missing cl_intel_subgroups_char define" #endif @@ -396,7 +396,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_char : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroups_long #error "Missing cl_intel_subgroups_long define" #endif @@ -408,7 +408,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_long : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroups_short #error "Missing cl_intel_subgroups_short define" #endif @@ -420,7 +420,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroup_buffer_prefetch #error "Missing cl_intel_subgroup_buffer_prefetch define" #endif @@ -432,7 +432,7 @@ // expected-warning@+1{{OpenCL extension 'cl_intel_subgroup_buffer_prefetch' unknown or does not require pragma - ignoring}} #pragma OPENCL EXTENSION cl_intel_subgroup_buffer_prefetch : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_subgroup_local_block_io #error "Missing cl_intel_subgroup_local_block_io define" #endif @@ -444,7 +444,7 @@ // expected-warning@+1{{OpenCL extension 'cl_intel_subgroup_local_block_io' unknown or does not require pragma - ignoring}} #pragma OPENCL EXTENSION cl_intel_subgroup_local_block_io : enable -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)) #ifndef cl_intel_device_side_avc_motion_estimation #error "Missing cl_intel_device_side_avc_motion_estimation define" #endif _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
