[OpenCL] Remove unused extensions

Many non-language extensions are defined but also unused. This patch
removes them with their tests as they do not require compiler support.

The cl_khr_select_fprounding_mode extension is also removed because it
has been deprecated since OpenCL 1.1 and Clang doesn't have any specific
support for it.

The cl_khr_context_abort extension is only referred to in "The OpenCL
Specification", version 1.2 and 2.0, in Table 4.3, but no specification
is provided in "The OpenCL Extension Specification" for these versions.
Because it is both unused in Clang and lacks specification, this
extension is removed.

The following extensions are platform extensions that bring new OpenCL
APIs but do not impact the kernel language nor require compiler support.
They are therefore removed.

- cl_khr_gl_sharing, introduced in OpenCL 1.0

- cl_khr_icd, introduced in OpenCL 1.2

- cl_khr_gl_event, introduced in OpenCL 1.1
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquireGLObjects.
Hence, they cannot be used on the device side and the extension does
not impact the kernel language.

- cl_khr_d3d10_sharing, introduced in OpenCL 1.1

- cl_khr_d3d11_sharing, introduced in OpenCL 1.2

- cl_khr_dx9_media_sharing, introduced in OpenCL 1.2

- cl_khr_image2d_from_buffer, introduced in OpenCL 1.2

- cl_khr_initialize_memory, introduced in OpenCL 1.2

- cl_khr_gl_depth_images, introduced in OpenCL 1.2
Note: this extension is related to cl_khr_depth_images but only the
latter adds new features to the kernel language.

- cl_khr_spir, introduced in OpenCL 1.2

- cl_khr_egl_event, introduced in OpenCL 1.2
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquire* API
functions. Hence, they cannot be used on the device side and the
extension does not impact the kernel language.

- cl_khr_egl_image, introduced in OpenCL 1.2

- cl_khr_terminate_context, introduced in OpenCL 1.2

The minimum required OpenCL version used in OpenCLExtensions.def for
these extensions is not always correct. Removing these address that
issue.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D89372
This commit is contained in:
Marco Antognini 2020-10-12 15:17:03 +01:00
parent b2524eb944
commit a779a16993
7 changed files with 10 additions and 424 deletions

View File

@ -23,6 +23,16 @@
// core - minimum OpenCL version when the extension becomes optional core
// feature or core feature. ~0U indicates not a core feature or an
// optional core feature.
//
// As per The OpenCL Extension Specification, Section 1.2, in this file, an
// extension is defined if and only it either:
// * affects the OpenCL language semantics or its syntax,
// * adds built-in functions to the language.
//
// For such an extension, a preprocessor #define that matches the extension
// name must be created and a #pragma is required if and only if the
// compilation flow is impacted, e.g. due to a difference of syntax or
// semantics in the language compared to the core standard.
#ifndef OPENCLEXT_INTERNAL
#ifndef OPENCLEXT
@ -34,8 +44,6 @@
// OpenCL 1.0.
OPENCLEXT_INTERNAL(cl_khr_3d_image_writes, 100, 200)
// fprounding mode is special since it is not mentioned beyond 1.0
OPENCLEXT_INTERNAL(cl_khr_select_fprounding_mode, 100, 110)
OPENCLEXT_INTERNAL(cl_khr_byte_addressable_store, 100, 110)
OPENCLEXT_INTERNAL(cl_khr_fp16, 100, ~0U)
OPENCLEXT_INTERNAL(cl_khr_fp64, 100, 120)
@ -45,35 +53,19 @@ OPENCLEXT_INTERNAL(cl_khr_local_int32_base_atomics, 100, 110)
OPENCLEXT_INTERNAL(cl_khr_local_int32_extended_atomics, 100, 110)
OPENCLEXT_INTERNAL(cl_khr_int64_base_atomics, 100, ~0U)
OPENCLEXT_INTERNAL(cl_khr_int64_extended_atomics, 100, ~0U)
OPENCLEXT_INTERNAL(cl_khr_gl_sharing, 100, ~0U)
OPENCLEXT_INTERNAL(cl_khr_icd, 100, ~0U)
// OpenCL 1.1.
OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U)
OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U)
// EMBEDDED_PROFILE
OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U)
// OpenCL 1.2.
OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_depth_images, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_dx9_media_sharing, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_image2d_from_buffer, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_initialize_memory, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_gl_depth_images, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_gl_msaa_sharing, 120, ~0U)
OPENCLEXT_INTERNAL(cl_khr_spir, 120, ~0U)
// OpenCL 2.0.
OPENCLEXT_INTERNAL(cl_khr_egl_event, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_egl_image, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_mipmap_image, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_mipmap_image_writes, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_subgroup_extended_types, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_subgroup_non_uniform_vote, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_subgroup_ballot, 200, ~0U)

View File

@ -285,7 +285,6 @@ public:
void setSupportedOpenCLOpts() override {
auto &Opts = getSupportedOpenCLOpts();
Opts.support("cl_clang_storage_class_specifiers");
Opts.support("cl_khr_icd");
bool IsAMDGCN = isAMDGCN(getTriple());

View File

@ -128,8 +128,6 @@ public:
void setSupportedOpenCLOpts() override {
auto &Opts = getSupportedOpenCLOpts();
Opts.support("cl_clang_storage_class_specifiers");
Opts.support("cl_khr_gl_sharing");
Opts.support("cl_khr_icd");
Opts.support("cl_khr_fp64");
Opts.support("cl_khr_byte_addressable_store");

View File

@ -29,17 +29,6 @@
#endif
#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable
#ifdef cl_khr_gl_sharing
#error "Incorrect cl_khr_gl_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_sharing' - ignoring}}
#ifndef cl_khr_icd
#error "Missing cl_khr_icd define"
#endif
#pragma OPENCL EXTENSION cl_khr_icd: enable
// Core features in CL 1.1
#ifndef cl_khr_byte_addressable_store
@ -82,13 +71,6 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
#endif
#ifdef cl_khr_select_fprounding_mode
#error "Incorrect cl_khr_select_fprounding_mode define"
#endif
#pragma OPENCL EXTENSION cl_khr_select_fprounding_mode: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_select_fprounding_mode' - ignoring}}
// Core feature in CL 1.2
#ifndef cl_khr_fp64
#error "Missing cl_khr_fp64 define"
@ -107,80 +89,12 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_3d_image_writes' is core feature or supported optional core feature - ignoring}}
#endif
#ifdef cl_khr_gl_event
#error "Incorrect cl_khr_gl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}}
#ifdef cl_khr_d3d10_sharing
#error "Incorrect cl_khr_d3d10_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}}
#ifdef cl_khr_context_abort
#error "Incorrect cl_context_abort define"
#endif
#pragma OPENCL EXTENSION cl_khr_context_abort: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}}
#ifdef cl_khr_d3d11_sharing
#error "Incorrect cl_khr_d3d11_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d11_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}}
#ifdef cl_khr_dx9_media_sharing
#error "Incorrect cl_khr_dx9_media_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}}
#ifdef cl_khr_image2d_from_buffer
#error "Incorrect cl_khr_image2d_from_buffer define"
#endif
#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}}
#ifdef cl_khr_initialize_memory
#error "Incorrect cl_khr_initialize_memory define"
#endif
#pragma OPENCL EXTENSION cl_khr_initialize_memory: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}}
#ifdef cl_khr_gl_depth_images
#error "Incorrect cl_khr_gl_depth_images define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_depth_images: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}}
#ifdef cl_khr_gl_msaa_sharing
#error "Incorrect cl_khr_gl_msaa_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}}
#ifdef cl_khr_spir
#error "Incorrect cl_khr_spir define"
#endif
#pragma OPENCL EXTENSION cl_khr_spir: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}}
#ifdef cl_khr_egl_event
#error "Incorrect cl_khr_egl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}}
#ifdef cl_khr_egl_image
#error "Incorrect cl_khr_egl_image define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_image: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}}
#if (__OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_mipmap_image
#error "Missing cl_khr_mipmap_image define"
@ -211,12 +125,6 @@
#endif
#pragma OPENCL EXTENSION cl_khr_subgroups: enable
#ifdef cl_khr_terminate_context
#error "Incorrect cl_khr_terminate_context define"
#endif
#pragma OPENCL EXTENSION cl_khr_terminate_context: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_terminate_context' - ignoring}}
#ifndef cl_amd_media_ops
#error "Missing cl_amd_media_ops define"
#endif

View File

@ -40,16 +40,6 @@
#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_int64_extended_atomics' - ignoring}}
#ifndef cl_khr_gl_sharing
#error "Missing cl_khr_gl_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_sharing: enable
#ifndef cl_khr_icd
#error "Missing cl_khr_icd define"
#endif
#pragma OPENCL EXTENSION cl_khr_icd: enable
// Core features in CL 1.1
#ifndef cl_khr_byte_addressable_store
@ -92,16 +82,6 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
#endif
#if (__OPENCL_C_VERSION__ < 110)
// Deprecated above 1.0
#ifdef cl_khr_select_fprounding_mode
#error "Incorrect cl_khr_select_fprounding_mode define"
#endif
#pragma OPENCL EXTENSION cl_khr_select_fprounding_mode: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_select_fprounding_mode' - ignoring}}
#endif
// Core feature in CL 1.2
#ifndef cl_khr_fp64
#error "Missing cl_khr_fp64 define"
@ -118,80 +98,12 @@
#pragma OPENCL EXTENSION cl_khr_3d_image_writes: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_3d_image_writes' - ignoring}}
#ifdef cl_khr_gl_event
#error "Incorrect cl_khr_gl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}}
#ifdef cl_khr_d3d10_sharing
#error "Incorrect cl_khr_d3d10_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}}
#ifdef cl_khr_context_abort
#error "Incorrect cl_context_abort define"
#endif
#pragma OPENCL EXTENSION cl_khr_context_abort: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}}
#ifdef cl_khr_d3d11_sharing
#error "Incorrect cl_khr_d3d11_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d11_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}}
#ifdef cl_khr_dx9_media_sharing
#error "Incorrect cl_khr_dx9_media_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}}
#ifdef cl_khr_image2d_from_buffer
#error "Incorrect cl_khr_image2d_from_buffer define"
#endif
#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}}
#ifdef cl_khr_initialize_memory
#error "Incorrect cl_khr_initialize_memory define"
#endif
#pragma OPENCL EXTENSION cl_khr_initialize_memory: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}}
#ifdef cl_khr_gl_depth_images
#error "Incorrect cl_khr_gl_depth_images define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_depth_images: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}}
#ifdef cl_khr_gl_msaa_sharing
#error "Incorrect cl_khr_gl_msaa_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}}
#ifdef cl_khr_spir
#error "Incorrect cl_khr_spir define"
#endif
#pragma OPENCL EXTENSION cl_khr_spir: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}}
#ifdef cl_khr_egl_event
#error "Incorrect cl_khr_egl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}}
#ifdef cl_khr_egl_image
#error "Missing cl_khr_egl_image define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_image: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}}
#ifdef cl_khr_srgb_image_writes
#error "Incorrect cl_khr_srgb_image_writes define"
#endif
@ -204,8 +116,3 @@
#pragma OPENCL EXTENSION cl_khr_subgroups: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}}
#ifdef cl_khr_terminate_context
#error "Incorrect cl_khr_terminate_context define"
#endif
#pragma OPENCL EXTENSION cl_khr_terminate_context: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_terminate_context' - ignoring}}

View File

@ -48,17 +48,6 @@
#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_int64_extended_atomics' - ignoring}}
#ifdef cl_khr_gl_sharing
#error "Incorrect cl_khr_gl_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_sharing' - ignoring}}
#ifndef cl_khr_icd
#error "Missing cl_khr_icd define"
#endif
#pragma OPENCL EXTENSION cl_khr_icd: enable
// Core features in CL 1.1
#ifndef cl_khr_byte_addressable_store
@ -101,14 +90,6 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
#endif
// Deprecated abvoe 1.0
#ifdef cl_khr_select_fprounding_mode
#error "Incorrect cl_khr_select_fprounding_mode define"
#endif
#pragma OPENCL EXTENSION cl_khr_select_fprounding_mode: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_select_fprounding_mode' - ignoring}}
// Core feature in CL 1.2
#ifdef __HAS_FP64__
#ifndef cl_khr_fp64
@ -133,79 +114,12 @@
#pragma OPENCL EXTENSION cl_khr_3d_image_writes: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_3d_image_writes' - ignoring}}
#ifdef cl_khr_gl_event
#error "Incorrect cl_khr_gl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}}
#ifdef cl_khr_d3d10_sharing
#error "Incorrect cl_khr_d3d10_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}}
#ifdef cl_khr_context_abort
#error "Incorrect cl_context_abort define"
#endif
#pragma OPENCL EXTENSION cl_khr_context_abort: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}}
#ifdef cl_khr_d3d11_sharing
#error "Incorrect cl_khr_d3d11_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_d3d11_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}}
#ifdef cl_khr_dx9_media_sharing
#error "Incorrect cl_khr_dx9_media_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}}
#ifdef cl_khr_image2d_from_buffer
#error "Incorrect cl_khr_image2d_from_buffer define"
#endif
#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}}
#ifdef cl_khr_initialize_memory
#error "Incorrect cl_khr_initialize_memory define"
#endif
#pragma OPENCL EXTENSION cl_khr_initialize_memory: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}}
#ifdef cl_khr_gl_depth_images
#error "Incorrect cl_khr_gl_depth_images define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_depth_images: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}}
#ifdef cl_khr_gl_msaa_sharing
#error "Incorrect cl_khr_gl_msaa_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}}
#ifdef cl_khr_spir
#error "Incorrect cl_khr_spir define"
#endif
#pragma OPENCL EXTENSION cl_khr_spir: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}}
#ifdef cl_khr_egl_event
#error "Incorrect cl_khr_egl_event define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_event: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}}
#ifdef cl_khr_egl_image
#error "Incorrect cl_khr_egl_image define"
#endif
#pragma OPENCL EXTENSION cl_khr_egl_image: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}}
#ifdef cl_khr_srgb_image_writes
#error "Incorrect cl_khr_srgb_image_writes define"
#endif
@ -218,8 +132,3 @@
#pragma OPENCL EXTENSION cl_khr_subgroups: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}}
#ifdef cl_khr_terminate_context
#error "Incorrect cl_khr_terminate_context define"
#endif
#pragma OPENCL EXTENSION cl_khr_terminate_context: enable
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_terminate_context' - ignoring}}

View File

@ -34,16 +34,6 @@
#endif
#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable
#ifndef cl_khr_gl_sharing
#error "Missing cl_khr_gl_sharing define"
#endif
#pragma OPENCL EXTENSION cl_khr_gl_sharing: enable
#ifndef cl_khr_icd
#error "Missing cl_khr_icd define"
#endif
#pragma OPENCL EXTENSION cl_khr_icd: enable
// Core features in CL 1.1
#ifndef cl_khr_byte_addressable_store
@ -86,15 +76,6 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
#endif
#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 110)
// Deprecated abvoe 1.0
#ifndef cl_khr_select_fprounding_mode
#error "Missing cl_khr_select_fp_rounding_mode define"
#endif
#pragma OPENCL EXTENSION cl_khr_select_fprounding_mode: enable
#endif
// Core feature in CL 1.2
#ifndef cl_khr_fp64
#error "Missing cl_khr_fp64 define"
@ -113,24 +94,6 @@
// expected-warning@-2{{OpenCL extension 'cl_khr_3d_image_writes' is core feature or supported optional core feature - ignoring}}
#endif
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110)
#ifndef cl_khr_gl_event
#error "Missing cl_khr_gl_event define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_gl_event : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110)
#ifndef cl_khr_d3d10_sharing
#error "Missing cl_khr_d3d10_sharing define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_d3d10_sharing : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110)
#ifndef cles_khr_int64
#error "Missing cles_khr_int64 define"
@ -140,60 +103,6 @@
#endif
#pragma OPENCL EXTENSION cles_khr_int64 : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_context_abort
#error "Missing cl_context_abort define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_context_abort : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_d3d11_sharing
#error "Missing cl_khr_d3d11_sharing define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_dx9_media_sharing
#error "Missing cl_khr_dx9_media_sharing define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_image2d_from_buffer
#error "Missing cl_khr_image2d_from_buffer define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_initialize_memory
#error "Missing cl_khr_initialize_memory define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_initialize_memory : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_gl_depth_images
#error "Missing cl_khr_gl_depth_images define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_gl_depth_images : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_gl_msaa_sharing
#error "Missing cl_khr_gl_msaa_sharing define"
@ -203,33 +112,6 @@
#endif
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_khr_spir
#error "Missing cl_khr_spir define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_spir : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_egl_event
#error "Missing cl_khr_egl_event define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_egl_event : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_egl_image
#error "Missing cl_khr_egl_image define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_egl_image : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_mipmap_image
#error "Missing cl_khr_mipmap_image define"
@ -275,15 +157,6 @@
#endif
#pragma OPENCL EXTENSION cl_khr_subgroups : enable
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_terminate_context
#error "Missing cl_khr_terminate_context define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_terminate_context' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_khr_terminate_context: enable
#ifndef cl_amd_media_ops
#error "Missing cl_amd_media_ops define"
#endif