Flag -cl-ext for OpenCL input

Hello everyone,

I am trying to use clang for a group of OpenCL codes to transform all of them into bytecode. I am using the following command:

clang -x cl -cl-std=CL2.0 -emit-llvm -target spir64 -Xclang -finclude-default-header -cl-single-precision-constant INPUT.cl -o INPUT.bc

I have tried to use the flag "-cl-ext=+ cl_khr_fp64 " instead of the flag "-cl-std =CL2.0 " to add the OpenCL extension cl_khr_fp64, but it does not work.

Any suggestion about the problem?

Thanks in advance.

Hi Enrique,

Could you please clarify a bit what “does not work.” means exactly?

Have you faced some compilation error, or emitted LLVM IR is different from what you expected to see?