Forum Discussion
Thank you for the reply.
I looked into the link provided and added the BSP flag for stratix usm. I was able to compile the sample but I am not able to run it on an FPGA. Below are the steps I followed while trying to compile and run the code. Could you let me know where I went wrong.
1) created a compile_and_run.sh file with the following content
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh --force
cd oneAPI-samples/DirectProgramming/DPC++/DenseLinearAlgebra/vector-add/src
echo STARTING COMPILATION
dpcpp -fintelfpga -Xshardware -Xsboard=/opt/intel/oneapi/intel_s10sx_pac:pac_s10_usm vector-add-usm.cpp -o vector_usm.fpga
echo COMPILATION DONE
echo STARTING TO RUN ON FPGA HARDWARE
./vector_usm.fpga
echo RUN COMPLETE
2) submitted the job to a node containing fpga_compile property (qsub -l node=1:fpga_compile:ppn=2 -d . compile_and_run.sh)
3) The resulting output and error files were generated (screenshots attached)
4) While I tried to run the stratix code on a node having 'fpga_compile' I could not run it. So I opened an Interactive session with a node having 'fpga-runtime' and 'stratix10' as properties and ran the code (./..../vector_usm.fpga). The following was the result :
Running on device: Intel(R) FPGA Emulation Device
Vector size: 10000
An exception is caught while adding two vectors.
terminate called after throwing an instance of 'cl::sycl::runtime_error'
what(): Native API failed. Native API returns: -42 (CL_INVALID_BINARY) -42 (CL_INVALID_BINARY)
Aborted
For some reason it is not able to select the FPGA hardware. Is there a particular node having usm supported FPGA ?