Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1720 Discussions

FPGA compilation not working

murrtank
Novice
1,119 Views

I have met a problem when trying to compile my code to FPGA. I get this error 

aoc: Compiling for FPGA. This process may take several hours to complete.  Prior to performing this compile, be sure to check the reports to ensure the design will meet your performance targets.  If the reports indicate performance targets are not being met, code edits may be required.  Please refer to the oneAPI FPGA Optimization Guide for information on performance tuning applications for FPGAs.
Error: The board package being used only supports report generation/emulation/runtime, please use the board package shipped in the FPGA addon instead.
Error: Exiting.

llvm-foreach: 
dpcpp: error: fpga compiler command failed with exit code 1 (use -v to see invocation)

I have seen similar problems here, but the solution given here (https://community.intel.com/t5/Intel-DevCloud/Cannot-find-board-package-on-devcloud/td-p/1421143) didn't work.

I'm using this command to get on a fpga_compile node.

qsub -I -l nodes=1:fpga_compile:ppn=2 -d .

Then I use this bash file,

source /opt/intel/inteloneapi/setvars.sh > /dev/null 2>&1
export PATH=/glob/intel-python/python2/bin:${PATH}

make clean
make build_fpga

which gives this compile command.

$(DPCPP_CXX) $(DPCPP_CXXFLAGS) -fintelfpga -Xshardware $(DPCPP_SOURCES) -o GEMM.fpga -reuse-exe=GEMM.fpga -Xsprofile -Xsboards=/opt/intel/oneapi/intel_a10gx_pac:pac_a10

 And then I get the error above

 

Can someone help me understand how to get this to work?

0 Kudos
1 Solution
Rahila_T_Intel
Employee
1,062 Views

Hi,


Thank you for posting in Intel communities.


Could you please try the below suggestions.


you need to checkout the 2022.3.0 tag.

That will address the following error that you might encounter otherwise:


"fatal error: 'sycl/sycl.hpp' file not found"


This is just a temporary solution until the latest code changes are merged into the master branch.


$ git clone https://github.com/oneapi-src/oneAPI-samples.git


$ git fetch --all --tags

Fetching origin

From https://github.com/oneapi-src/oneAPI-samples

t [tag update] 2022.3.0 -> 2022.3.0


$ git checkout tags/2022.3.0

Checking out files: 100% (270/270), done.

Note: checking out 'tags/2022.3.0'.


$ git branch

* (HEAD detached at 2022.3.0)

 master


when compiling on an fpga_compile node, you need to specify an additional argument to the cmake command:


# for Arria10

$ cmake .. -DFPGA_BOARD=/opt/intel/oneapi/intel_a10gx_pac:pac_a10


or


# for Stratix10

$ cmake .. -DFPGA_BOARD=/opt/intel/oneapi/intel_s10sx_pac:pac_s10


This step is not necessary when compiling on a compute node that hosts a physical FPGA card such as Arria10 or Stratix10.

There are other samples not using cmake but just make instead, such as vector-add.

In this case, in order to compile on an fpga_compile node you need to make changes to the makefile.


Replace the following:


$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware


with


# for Arria10

$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_a10gx_pac:pac_a10


or


# for Stratix10

$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_s10sx_pac:pac_s10


 

If you are still facing the issue, please let me know 

1. The samples you are trying to run

2. The node number in which you are trying out the same.

Thanks


View solution in original post

0 Kudos
4 Replies
Rahila_T_Intel
Employee
1,063 Views

Hi,


Thank you for posting in Intel communities.


Could you please try the below suggestions.


you need to checkout the 2022.3.0 tag.

That will address the following error that you might encounter otherwise:


"fatal error: 'sycl/sycl.hpp' file not found"


This is just a temporary solution until the latest code changes are merged into the master branch.


$ git clone https://github.com/oneapi-src/oneAPI-samples.git


$ git fetch --all --tags

Fetching origin

From https://github.com/oneapi-src/oneAPI-samples

t [tag update] 2022.3.0 -> 2022.3.0


$ git checkout tags/2022.3.0

Checking out files: 100% (270/270), done.

Note: checking out 'tags/2022.3.0'.


$ git branch

* (HEAD detached at 2022.3.0)

 master


when compiling on an fpga_compile node, you need to specify an additional argument to the cmake command:


# for Arria10

$ cmake .. -DFPGA_BOARD=/opt/intel/oneapi/intel_a10gx_pac:pac_a10


or


# for Stratix10

$ cmake .. -DFPGA_BOARD=/opt/intel/oneapi/intel_s10sx_pac:pac_s10


This step is not necessary when compiling on a compute node that hosts a physical FPGA card such as Arria10 or Stratix10.

There are other samples not using cmake but just make instead, such as vector-add.

In this case, in order to compile on an fpga_compile node you need to make changes to the makefile.


Replace the following:


$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware


with


# for Arria10

$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_a10gx_pac:pac_a10


or


# for Stratix10

$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_s10sx_pac:pac_s10


 

If you are still facing the issue, please let me know 

1. The samples you are trying to run

2. The node number in which you are trying out the same.

Thanks


0 Kudos
Rahila_T_Intel
Employee
1,034 Views

Hi,


We have not heard back from you. Could you please give an update?


Thanks


0 Kudos
murrtank
Novice
1,026 Views

Hi, sorry! It seem to work now thanks for the help

0 Kudos
Rahila_T_Intel
Employee
1,013 Views

Hi,


 

Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks


0 Kudos
Reply