-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[OpenCL] Add missing Intel extensions to OpenCLExtensions.def #169875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenCL] Add missing Intel extensions to OpenCLExtensions.def #169875
Conversation
Add following extensions: cl_intel_subgroup_buffer_prefetch cl_intel_subgroup_local_block_io cl_intel_subgroups_char cl_intel_subgroups_long This allows targets to expose these extensions via getSupportedOpenCLOpts and ensures macros are defined when enabled.
|
@llvm/pr-subscribers-clang Author: Wenju He (wenju-he) ChangesAdd following extensions: This allows targets to expose these extensions via getSupportedOpenCLOpts and ensures macros are defined when enabled. Full diff: https://github.com/llvm/llvm-project/pull/169875.diff 2 Files Affected:
diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def
index 809f73be90c4e..5b964bc292ecd 100644
--- a/clang/include/clang/Basic/OpenCLExtensions.def
+++ b/clang/include/clang/Basic/OpenCLExtensions.def
@@ -141,7 +141,11 @@ OPENCL_EXTENSION(cl_amd_media_ops2, true, 100)
// Intel OpenCL extensions
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 C 3.0 features (6.2.1. Features)
diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl
index c634cf313b36d..7e06ecfbc73bf 100644
--- a/clang/test/SemaOpenCL/extension-version.cl
+++ b/clang/test/SemaOpenCL/extension-version.cl
@@ -340,6 +340,24 @@
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups : enable
+#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroups_char
+#error "Missing cl_intel_subgroups_char define"
+#endif
+#else
+// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_char' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_intel_subgroups_char : enable
+
+#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroups_long
+#error "Missing cl_intel_subgroups_long define"
+#endif
+#else
+// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_long' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_intel_subgroups_long : enable
+
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroups_short
#error "Missing cl_intel_subgroups_short define"
@@ -349,6 +367,18 @@
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups_short : enable
+#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroup_buffer_prefetch
+#error "Missing cl_intel_subgroup_buffer_prefetch define"
+#endif
+#endif
+
+#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroup_local_block_io
+#error "Missing cl_intel_subgroup_local_block_io define"
+#endif
+#endif
+
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_device_side_avc_motion_estimation
#error "Missing cl_intel_device_side_avc_motion_estimation define"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
kindly ping |
|
@cdai2, FYI. |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/20054 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/11950 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/8/builds/24447 Here is the relevant piece of the build log for the reference |
…69875) Add following extensions: cl_intel_bfloat16_conversion cl_intel_subgroup_buffer_prefetch cl_intel_subgroup_local_block_io cl_intel_subgroups_char cl_intel_subgroups_long This allows targets to expose these extensions via getSupportedOpenCLOpts and ensures macros are defined when enabled.
Add following extensions:
cl_intel_bfloat16_conversion
cl_intel_subgroup_buffer_prefetch
cl_intel_subgroup_local_block_io
cl_intel_subgroups_char
cl_intel_subgroups_long
This allows targets to expose these extensions via getSupportedOpenCLOpts and ensures macros are defined when enabled.