oneAPI-samples icon indicating copy to clipboard operation
oneAPI-samples copied to clipboard

simple-add and vector-add samples - build process broken without (an optional) Quartus dependency

Open skiselev opened this issue 2 years ago • 1 comments

Summary

The build of simple-add and vector-add samples fails. It appears to require Quartus to proceed. It is expected that most users will not build for FPGA target. So this dependency seems to be bogus

Version

oneAPI Base Kit 2023.1.0 oneAPI-samples: 5be94fc7db259dafd54e8aedfcc99b39dc025cfc

Environment

Ubuntu 20.04

Steps to reproduce

  • Clone this repo
  • cd oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add
  • mkdir build
  • cd build
  • cmake ..
  • make

Observed behavior

The make process fails with the following error output:

Scanning dependencies of target vector-add-buffers.fpga_sim
[ 12%] Building CXX object src/CMakeFiles/vector-add-buffers.fpga_sim.dir/vector-add-buffers.cpp.o
[ 25%] Linking CXX executable ../vector-add-buffers.fpga_sim
aoc: This compilation stage requires an installation of Intel(R) Quartus(R) Prime software!
aoc: However Quartus was not found on the PATH or passed in using QUARTUS_ROOTDIR_OVERRIDE.
aoc: If you have a valid installation, please pass it in using QUARTUS_ROOTDIR_OVERRIDE or add it to the PATH.
aoc: Otherwise, consider downloading Quartus from here: https://www.intel.com/content/www/us/en/software-kit/661712/intel-quartus-prime-pro-edition-design-software-version-19-2-for-linux.html
llvm-foreach:
icpx: error: fpga compiler command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/vector-add-buffers.fpga_sim.dir/build.make:84: vector-add-buffers.fpga_sim] Error 1
make[1]: *** [CMakeFiles/Makefile2:187: src/CMakeFiles/vector-add-buffers.fpga_sim.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Expected behavior

The sample will build for CPU/GPU target (and maybe FPGA emulation), not for FPGA hardware

skiselev avatar Apr 05 '23 20:04 skiselev

The README explains how to build the project for all the different targets:

  • cpu-gpu: I guess that this is what you are looking for. It targets the default selector and does not require additional software
  • fpga_emu: FPGA emulator. Does not require additional software.
  • fpga_sim: FPGA simulator. Does require additional software.
  • fpga: FPGA hardware. Does require additional software.

In the case of the cpu-gpu, the instructions are given as follow: image

So you need to specify what you want to build. There are also instructions for building the fpga_emu, fpga_sim and fpga targets in the README.

I can see that you typed “make” which by default, tries to build all available targets (and this is not what we recommend doing in the README).

Because some additional software is required for building some of the FPGA specific targets, there is a note in the “Prerequisites” section of the README to warn the users about this: image

So I think that the README covers all the necessary instructions.

Let me know if you need further clarifications.

yuguen avatar Apr 06 '23 07:04 yuguen