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

fatal error: 'CL/sycl/INTEL/fpga_extensions.hpp' file not found

za2561
Beginner
346 Views

I want to access Intel FPGAs through devcloud, I am new to cloud development so I used the easiest option which is Jupyter notebook.

I m trying to run Hough transform available as sample on the Jupyter notebook on intel oneapi devcloud, but when i tried to emulate the code through the following command:

icpx -fsycl -fintelfpga src/original/hough_transform.cpp -DFPGA_EMULATOR -o bin/hough_transform.emu

i got the following error:

src/original/hough_transform.cpp:8:10: fatal error: 'CL/sycl/INTEL/fpga_extensions.hpp' file not found
#include <CL/sycl/INTEL/fpga_extensions.hpp>

 

please help me to resolve this, and ill be very grateful

0 Kudos
9 Replies
DiyaN_Intel
Moderator
316 Views

Hi, 

 

Thank you for posting in Intel communities. 

 

Please try to make the following changes in the code and it will work perfectly, try to ignore the warnings if you get any.

 

In the hough_transform.cpp please make the below changes - 

 

1. In line 9 change from 

#include <CL/sycl/INTEL/fpga_extensions.hpp>

    to 

#include <sycl/ext/intel/fpga_extensions.hpp>

 

2. In line 72 change from

sycl::INTEL::fpga_emulator_selector device_selector

    to

sycl::ext::intel::fpga_emulator_selector device_selector

 

3. In line 76 change from 

sycl::INTEL::fpga_selector device_selector

    to

sycl::ext::intel::fpga_selector device_selector

 

In hough_transform_kernel.hpp please make the below changes - 

 

1. In line 9 change from 

  

#include <CL/sycl/INTEL/fpga_extensions.hpp>

  to

#include <sycl/ext/intel/fpga_extensions.hpp>

2. In line 30 change from 

INTEL::fpga_emulator_selector device_selector

    to 

intel::fpga_emulator_selector device_selector

3. In line 32 change from 

INTEL::fpga_selector device_selector

  to 

intel::fpga_selector device_selector

 

In addition, you can run the command (i.e. mkdir bin) to make the directory bin and proceed with the compilation like I did in the below screenshot.

DiyaN_Intel_0-1671452072068.png

 

If you face any issue please connect back to us. 

If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue. Thank you!

 

Regards, 

Diya

 

 

 

 

 

za25611
Novice
302 Views

Thank you so much for your help diya, but now the jupyter doesn't recognize the dpcpp, as shown in code snippet below. it cannot even find icpx.

 

za25611_1-1671497301736.png

 

 

DiyaN_Intel
Moderator
284 Views

Hi , 

 

Could you please try setting up oneAPI environment variables forcefully and check once again if it is running properly or not.

Please run the below command:

 

source /opt/intel/oneapi/setvars.sh --force

 

If you face any issues please connect back to us. 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!

 

Regards, 

Diya 

 

 

 

 

 

 

za25611
Novice
259 Views

Thanks a lot, the first line, 

source /opt/intel/oneapi/setvars.sh --force

helped in setting the environment and i got the output

:: oneAPI environment initialized ::

but when i try to emulate i again get the error: /usr/bin/ld: cannot open output file bin/hough_transform.emu: No such file or directory, even though i created the bin directory, as can be seen in the attached pic

za25611_0-1671646561411.png

 

DiyaN_Intel
Moderator
233 Views

Hi, 

 

It seems like you have created the bin folder in the home directory.

Could you please create the bin folder in the mentioned path and try to run the code again:

 

~/Hough_Transform_on_FPGAs_Using_oneAPI/01_FPGA_Emulation_Using_Intel_oneAPI_Base_Toolkit

 

If you face any issues please connect back to us. 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!

 

Regards, 

Diya

 

za25611
Novice
220 Views

thank you,with your kind guidance, i have reached to the optimization stage,

Platform name: Intel(R) FPGA Emulation Platform for OpenCL(TM)
Device name: Intel(R) FPGA Emulation Device
Kernel execution time: 0.016045 seconds
VERIFICATION PASSED!!

 

The compile is finished.

but when i see reports.html in the

bin/unroll/hough_transform_split.prj/reports/report.html

nothing appears when i press trust html button, as shown in screenshot in the pic attached

za25611_0-1671717187089.png

 

although i can see the report_data.js file as below

za25611_1-1671717352032.png

 

DiyaN_Intel
Moderator
205 Views

Hi, 


Good day to you.


Glad to know that it is working for you now.


Can you please let us know if you have done any additional steps to get that report.html as well as report_data.js file generation as we can't see that in our notebook.



Regards, 

Diya


za25611
Novice
192 Views

after getting: Kernel execution time: 0.016045 seconds
VERIFICATION PASSED!!

u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI$ cd 02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit

 

u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ ! dpcpp -fintelfpga -fsycl-link -Xshardware src/split/main.cpp src/split/hough_transform_kernel.cpp -o bin/split/hough_transform_split.a
icpx: warning: use of 'dpcpp' is deprecated and will be removed in a future release. Use 'icpx -fsycl' [-Wdeprecated]
In file included from src/split/main.cpp:11:
src/split/hough_transform_kernel.hpp:11:10: fatal error: '../util/sin_cos_values.h' file not found
#include "../util/sin_cos_values.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ mkdir bin
u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ cd bin
u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit/bin$ mkdir split
u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit/bin$ cd ..
u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ ! dpcpp -fintelfpga -fsycl-link -Xshardware src/split/main.cpp src/split/hough_transform_kernel.cpp -o bin/split/hough_transform_split.a
icpx: warning: use of 'dpcpp' is deprecated and will be removed in a future release. Use 'icpx -fsycl' [-Wdeprecated]
In file included from src/split/main.cpp:11:
src/split/hough_transform_kernel.hpp:11:10: fatal error: '../util/sin_cos_values.h' file not found
#include "../util/sin_cos_values.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~

 

Then i copied sin_cos_values.h in the folder util to the folder 02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit/util to the folder 02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit/src/split and changed the line in the file src/split/hough_transform_kernel.hpp:11:10 from #include "../util/sin_cos_values.h" to #include "sin_cos_values.h"

 

u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ ! dpcpp -fintelfpga -fsycl-link -Xshardware src/split/main.cpp src/split/hough_transform_kernel.cpp -o bin/split/hough_transform_split.a

.

.

got many warnings

.

.

u182070@s001-n011:~/Hough_Transform_on_FPGAs_Using_oneAPI/02_FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit$ ! echo "The compile is finished."
The compile is finished.

then i followed the instruction in the  file as shown in following screenshot:

za25611_1-1671799937945.png

 

therefore, when i searched the path bin/split/hough_transform_split.prj/reports/report.html, i found the files 

report_data.js and many. According to FPGA_Optimization_Report_Generation_Using_Intel_oneAPI_Base_Toolkit.pdf file, for getting reports, i need to open report.html file and press trust HTML, and pressing  is not giving any output.

 

 

DiyaN_Intel
Moderator
155 Views

Hi, 


We are investigating your issue at our end and working on this internally. We will get back to you with an update soon.


Regards, 

Diya



Reply