Search code examples
tensorflowopenclgpuopencl-c

Why SYCL supports openCL 1.2 or above?


I am a student. My question may be very silly but I want to clear it. I have a device with Vivante GPU with openCL 1.1 version. I want to run tensorflow sample code with SYCL support on GPU. But before trying Tensorflow sample code, I want to try SYCL sample code with openCL 1.1 on GPU.

I have seen several SYCL implementations, like computeCPP, triSYCL, sycl-gtx. All the implementations support openCL 1.2 or above.

Does anyone know the reason why SYCL doesn't support openCL 1.1?

And how feasible will it be the attempt to modify the SYCL open-source code to support openCL 1.1?


Solution

  • The main reason for SYCL 1.2 to require OpenCL 1.2 is because the Khronos intermediate representation SPIR 1.2 requires it. Without SPIR, or any other intermediate representation, a SYCL implementation cannot compile C++ code into device binaries, and would need to convert C++ to OpenCL C, which is quite problematic.