[all-commits] [llvm/llvm-project] b12e07: [OpenCL] Set KHR extensions minimum version to Ope...

Wenju He via All-commits all-commits at lists.llvm.org
Mon Jan 19 00:05:21 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b12e070b9238e68ad678b8c6d3d6e01d6f13728f
      https://github.com/llvm/llvm-project/commit/b12e070b9238e68ad678b8c6d3d6e01d6f13728f
  Author: Wenju He <wenju.he at intel.com>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M clang/include/clang/Basic/OpenCLExtensions.def
    M clang/lib/Headers/opencl-c-base.h
    M clang/lib/Headers/opencl-c.h
    M clang/lib/Sema/OpenCLBuiltins.td
    M clang/test/Headers/opencl-c-header.cl
    M clang/test/Misc/amdgcn.languageOptsOpenCL.cl
    M clang/test/SemaOpenCL/extension-version.cl
    M clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl

  Log Message:
  -----------
  [OpenCL] Set KHR extensions minimum version to OpenCL 1.0 (2nd try) (#176681)

Motivation is similar to 25cfdaa4e9dc. Their spec don't specify a
required OpenCL version. Targets may expose them before OpenCL 1.2. Set
KHR extensions (depth images, mipmaps, subgroups, kernel clock, dot
product, ext_float_atomics, extended_bit_ops, cles_khr_int64) to
availability 1.0.
Changes to opencl-c.h:
* Relax header and test guards to allow extension macros whenever any
OpenCL C version is defined.
* Relax cl_khr_depth_images guard to allow cl_khr_depth_images, OpenCL
C++, or OpenCL C 2.0+, since image2d_depth_t and image2d_array_depth_t
types require that coverage.
* Guard image1d_t, image1d_array_t and image2d_array_t types with OpenCL
C++ or OpenCL C 1.2+ to match with OpenCL C spec.

Relates to https://github.com/KhronosGroup/OpenCL-CTS/pull/2376.

Update: The first attempt was reverted in #175993, but the regression
described in #175993 should be fixed in ROCm/llvm-project's opencl-c.h.
See https://github.com/llvm/llvm-project/pull/175993#issuecomment-3762586432



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list