[all-commits] [llvm/llvm-project] 826905: [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

Anton Zabaznov via All-commits all-commits at lists.llvm.org
Fri May 21 05:01:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 826905787ae4c8540bb8a2384fac59c606c7eaff
      https://github.com/llvm/llvm-project/commit/826905787ae4c8540bb8a2384fac59c606c7eaff
  Author: Anton Zabaznov <anton.zabaznov at intel.com>
  Date:   2021-05-21 (Fri, 21 May 2021)

  Changed paths:
    M clang/docs/OpenCLSupport.rst
    M clang/include/clang/Basic/DiagnosticCommonKinds.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Basic/Targets.cpp
    M clang/lib/Basic/Targets/AMDGPU.h
    M clang/lib/Basic/Targets/NVPTX.h
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/CodeGenOpenCL/printf.cl
    A clang/test/Misc/opencl-c-3.0.incorrect_options.cl
    R clang/test/SemaOpenCL/extensions.cl
    A clang/test/SemaOpenCL/fp64-fp16-options.cl

  Log Message:
  -----------
  [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

There already exists cl_khr_fp64 extension. So OpenCL C 3.0
and higher should use the feature, earlier versions still
use the extension. OpenCL C 3.0 API spec states that extension
will be not described in the option string if corresponding
optional functionality is not supported (see 4.2. Querying Devices).
Due to that fact the usage of features for OpenCL C 3.0 must
be as follows:

```
$ clang -Xclang -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 ...

$ clang -Xclang -cl-ext=-cl_khr_fp64,-__opencl_c_fp64 ...
```

e.g. the feature and the equivalent extension (if exists)
must be set to the same values

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D96524




More information about the All-commits mailing list