Forum Discussion
StefanoC
Occasional Contributor
2 years agooneAPI on Cyclone10gx
Hi all, the official Intel fpga requirement page says the Cyclone10gx fpga is supported by oneAPI so I downloaded the latest version on my Ubuntu20 (Quartus Prime also installed), I tried to compile...
BoonBengT_Altera
Moderator
2 years agoHi @StefanoC,
Thank you for posting in Intel community forum on your interest in oneAPI and hope all is well.
If I understand the situation correctly it seems that you are trying to run the hardware compilation in the IP authoring flow, and based on the error message it complaining that device not found.
Hence suspecting that the command line used might be incorrect, for that you may refer to the compilation flags below:
Hope that clarify
Best Wishes
BB
StefanoC
Occasional Contributor
2 years agoI am trying to compile and run this sample code:
#include <CL/sycl.hpp> #include <iostream> #include <sycl/ext/intel/fpga_extensions.hpp> using namespace cl::sycl; int main() { auto selector = sycl::ext::intel::fpga_selector_v; queue q(selector); const int N = 100; int a[N], b[N], c[N]; // Initialize arrays on the host for (int i = 0; i < N; i++) { a[i] = i; b[i] = i * 2; } buffer<int, 1> buf_a(a, range<1>(N)); // Create buffers for arrays buffer<int, 1> buf_b(b, range<1>(N)); buffer<int, 1> buf_c(c, range<1>(N)); q.submit([&](handler& h) { auto a_acc = buf_a.get_access<access::mode::read>(h); auto b_acc = buf_b.get_access<access::mode::read>(h); auto c_acc = buf_c.get_access<access::mode::write>(h); h.parallel_for(range<1>(N), [=](id<1> i) { c_acc[i] = a_acc[i] + b_acc[i]; // Perform element-wise addition }); }); q.wait(); // Wait for completion // Print results on the host for (int i = 0; i < N; i++) { std::cout << c[i] << " "; } std::cout << std::endl; return 0; }
following your link/suggestion I did add the proper flags (see below), I also made sure the board is seen by the OS but I still get the following runtime error:
tetto@ubuntuoffice:~/mytrial1$ jtagconfig 1) USB-BlasterII [1-1] 031820DD 10M08SA(.|ES)/10M08S(C|L) 02E120DD 10CX220Y tetto@ubuntuoffice:~/mytrial1$ icpx -fsycl -fintelfpga fpga_add2.cpp -Xshardware -Xstarget=Cyclone10GX -o fpga_compile.>aoc: Compiling for FPGA. This process may take several hours to complete. Prior to performing this compile, be sure to> tetto@ubuntuoffice:~/mytrial1$ ./fpga_compile.fpga terminate called after throwing an instance of 'sycl::_V1::runtime_error' what(): Invalid device program image: size is zero -30 (PI_ERROR_INVALID_VALUE) Aborted (core dumped)