Forum Discussion

FelipeML's avatar
FelipeML
Icon for New Contributor rankNew Contributor
5 years ago
Solved

Problem mixing FPGA and CPU kernels that resort to accessors for inter-device comms

Hi all and thanks in advance for any help that you could provide. It seems that the problem with which I opened this thread is still unsolved, and we have just found a modification that seems to na...
  • Hi,

    This issue of CL_INVALID_BINARY when compiling with the -fintelfpga flag while trying to run on CPU + FPGA can be solved by using the following flag in place of -fintelfpga: -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice. The full command would then be: dpcpp -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice vadd.cpp -o vadd.emu

    This stems from the fact that the -fintelfpga flag instructs the compiler to perform an offline/AOT compilation which specifically targets an fpga device only (similar to CPU offline compilation). You can see more on targeting multiple platforms here, which gives examples for FPGA emulation/hardware compiles with separate source files for the CPU and FPGA kernels.

    Best regards.