cl_khr_spir happears as an available extension for GPUs with the new OpenCL driver.
I am currently trying to generate spir programs using open-source LLVM.
These are my steps:
1) clang -x cl -O3 -target spir64 -include opencl_spir.h program.cl -S -emit-llvm -fno-builtin -o - | llvm-as -o program.bc
2) I create the program from binary loading program.bc
3) I build the program using the option -x spir, as documented here: cl_khr_spir (although this does not affect the final error)
Then I get the following build error:
loadBitcode failed Frontend phase failed compilation. Error: Compilation from LLVMIR binary to IL text failed!
Is it currently possible to run SPIR programs on GPUs ?
What am I missing in my procedure ?
Is there some documentation on how to run SPIR programs ?
Btw, the same problem arises when compiling for the CPU (an Intel I7 in my case) using the AMD CPU runtime.
Thank you in advance.