Application Acceleration With FPGAs
Programmable Acceleration Cards (PACs), DCP, FPGA AI Suite, Software Stack, and Reference Designs
477 Discussions

Debugging an emulated OpenCL FPGA kernel

OS5
Beginner
1,081 Views

Hi,

 

We are using Intel FPGA OpenCL SDK 21.1.

 

We cannot successfully set a breakpoint in the kernel when using the emulator and GDB. The breakpoint we set is never hit.

 

We installed GCC 7.2 as was specified in the instructions and we managed to build/run the emulated kernel.

 

We used the following instructions to setup a breakpoint:

“To run your kernel in the debugger:

     During program execution, the debugger cannot step from the host code to the kernel code. You must set a breakpoint before the actual kernel invocation by adding these lines:

        break <your_kernel>

         This line sets a breakpoint before the kernel.

        continue

         If you have not begun debugging your host, then type start instead.

    The debugger does not recognize kernel names until the host actually loads the kernel functions. As a result, the debugger generates the following warning for the breakpoint you set before the execution of the first kernel:

     Function "<your_kernel>" not defined.

     Make breakpoint pending on future shared library load? (y or [n])

     Answer y. After initial program execution, the debugger recognizes the function and variable names, and line number references for the duration of the session.”

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_programming_guide.pdf

 

This problem can be reproduced on the vector add example provided with the SDK. We are using Centos 7.9.

 

Is there a known problem with debugging emulated kernels on OpenCL SDK 21.1?  Do we need to use a specific GDB version? Any other ideas what could be the problem?

 

Thx

0 Kudos
5 Replies
BoonBengT_Intel
Moderator
1,037 Views

Hi @OS5,

 

Thank you for posting in Intel community forum and hope all is well.
Mind if I asked did the emulation complication successfully to generate the aocx files?
And does it work previously? Reason asking is openCL are currently not fully tested/supported in CentOS 7.9.

 

By any chances do you have another OS that you can try on?
Full list of supported OS can be found here.
Hope to hear from you soon.

 

Best Wishes
BB

0 Kudos
OS5
Beginner
1,029 Views

Hi @BoonBengT_Intel ,

 

The emulation compilation completes successfully. The generated aocx file was successfully used in emulation (it produced correct results).

Debugging emulated kernels used to work in the past, in another version of OpenCL SDK but its been a while (a couple of years?) and I can not remember the OpenCL SDK version number nor the OS we used it on in the past.

I will see if I can install the SDK on another OS. Can you please send the supported OS list. The link is missing from your post.

 

Regards,

  OS

 

 

0 Kudos
BoonBengT_Intel
Moderator
1,018 Views

Hi @OS5,

 

Noted on the compilation status mention.
Apologies as I missed out the link previously, here is the full list of OS that are supported in OpenCL (pro) version.

 

Best Wishes
BB

0 Kudos
OS5
Beginner
1,010 Views

Thank you

0 Kudos
BoonBengT_Intel
Moderator
997 Views

Hi @OS5,

 

As there is no further clarification on this thread, it will be transitioned to community support for further help on doubts in this thread.
Thanks for your questions and as always pleasure having you here.

 

Best Wishes
BB

0 Kudos
Reply