- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed the steps found in
https://devcloud.intel.com/oneapi/get_started/baseToolkitSamples/
The vector-add example gives the correct output in the .o file if built and ran on the gpu node
However, for both the FPGA emulator and hardware approaches, while the vector-add example finished compiling and running with no error outputted to the .e file, the actual output of the vector addition operation is absent in the .o file, as shown below:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
From the above pics, I can see you are trying to source the environment variables once again because you are getting that error.
work around:
either u need to include the below command:
source /opt/intel/oneapi/setvars.sh --force
(or)
you need to remove (source /opt/intel/oneapi/setvars.sh) from your <xxx>.sh file
I hope you followed below steps:
git clone https://github.com/oneapi-src/oneAPI-samples.git
cd ./oneAPI-samples/DirectProgramming/DPC++/DenseLinearAlgebra/vector-add
To build/run for FPGA emulator:
qsub build_fpga_emu.sh
qsub run_fpga_emu.sh
for more information, please follow the below link:
Regards,
Jaideep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I tried your suggestion this is what I got
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When looking at the makefile it seems the build_fpga.sh file is incorrect. There is no target hw in the makefile. Instead there is a target called 'fpga', try using this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The build_fpga.sh file was the one that comes with the vector-add example by default
I did not edit it in any way
It should work out of the box like the documentation suggested here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As christoph9 suggested you need to modify build_fpga.sh. i.e.
from this:
to this:
After modifying the above build_fpga.sh script, rerun build_fpga.sh script.
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!
Regards,
Jaideep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, the above modifications did not solve the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if there are more environmental variables etc. to edit before the fpga can work.
But I cannot find anything related to that in the readme file of the vector-add example, other than the setvars variable that I mentioned in the first post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually there is currently something you should add to the compiler: A specific board package, the default one will currently probably not work on the fpga_compile-nodes. However the specific error-message should be in the .o file which you did'nt show...
If the error-message is something like
Error: The board package being used only supports report generation/emulation/runtime
It is the same error as in these posts:
https://community.intel.com/t5/Intel-DevCloud/FPGA-Compilation-Error/m-p/1421930#M6319
https://community.intel.com/t5/Intel-DevCloud/Issue-on-fpga-compile-nodes/m-p/1421924#M6318
In this case you just need to add the correct board package to the compiler arguments. Sadly this example just uses a plain makefile, so you need to add the parameter to each of the targets, at best behind each occurence of -Xshardware, this is the parameter used in all hardware-builds.
I think changing the 2 subtargets for the non-usm will be sufficient, here for the arria10 board:
vector-add-buffers.fpga: a_buffers.o
$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_a10gx_pac:pac_a10
vector-add-buffers_report.a_buffers: dev_buffers.o
$(CXX) $(CXXFLAGS) -fintelfpga -fsycl-link $^ -o $@ -Xshardware -Xsboard=/opt/intel/oneapi/intel_a10gx_pac:pac_a10
The only board with usm-support is "/opt/intel/oneapi/intel_s10sx_pac:pac_s10_usm", in case you want totest usm add these package to also to the usm-targets.
Best regards,
Christoph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
could you please try again?
Following some tweaks, I was able to compile on an fpga_compile node and execute on an arria10 node.
Please keep in mind the following two points:
you need to check out 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(Makefile.fpga).
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
Thanks,
Jaideep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!
Regards,
Jaideep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks,
Jaideep
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page