0

I used below command to build binary for nvidia GPU:

clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -o simple-sycl-app-cuda

But got below error message:

clang++: error: cannot find 'libspirv-nvptx64--nvidiacl.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv

I searched in both intel oneAPI installation path and cuda toolkit path, but cannot find the spirv-nvptx64-nvidiacl.bc. Anyone knows where to find libspirv-nvptx64—nvidiacl.bc?

Bart
  • 9,825
  • 5
  • 47
  • 73
cctv
  • 1

1 Answers1

3

It looks like you are trying to compile using the DPC++ compiler for Nvidia GPUs.

This option is not included in the oneAPI release installations from the Intel website. At the moment you will need to compile the DPC++ LLVM project with this enabled to be able to use the appropriate flag to target Nvidia devices.

You can follow the instructions on this page to compile the project and then it explains how to use the ptx target. In the future Codeplay, the company I work for, intends to publish release binaries that include the ptx compiler option.

Rod Burns
  • 2,104
  • 13
  • 24