intel sycl supports a-head-of time compile and cross-compile ARM?

266 views Asked by At

I am considering to build SYCL and OpenCL environment with the intel sycl and pocl by a-head-of-time compile and run them on ARM CPU board.

In theory, I think that is possible if intel sycl supports cross-compile. Could you tell me some comment or advice.

1

There are 1 answers

0
Rod Burns On

It’s possible to do this using ComputeCpp, Codeplay's implementation of SYCL, fairly easily using CMake and the correct toolchain file. There is an Arm toolchain file in the ComputeCpp SDK located in computecpp-sdk/cmake/toolchains/arm-gcc-poky.cmake, you could use it in the following example command. You’ll need to replace each path with your own. With this command for example you could build the computecpp-sdk source code and the produced binaries will run on the target arm device. Using the file Linux command on the binary will validate if the binary that has been built is the correct binary type for your target. Note that this will work best when using the FindComputeCpp.cmake file from the ComputeCpp SDK referenced above.

cmake -DComputeCpp_DIR=/path/to/computecpp-ce-xyz-arm \
  -DComputeCpp_HOST_DIR=/path/to/computecpp-ce-xyz-x86 \ 
  -DOpenCL_LIBRARY=path/to/libOpenCL.so.1.2 \
  -DOpenCL_INCLUDE_DIR=/path/to/opencl/include \
  -DCMAKE_TOOLCHAIN_FILE=../computecpp-sdk/cmake/toolchains/gcc-generic.cmake \
  -DCOMPUTECPP_BITCODE=spir64 ..