UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor rajuece
Visitor
13,414 Views
Registered: ‎07-25-2018

CPU emulation compute unit exited unexpectedly {SDACCEL}

The execution of the code ends giving this error.

CPU emulation compute unit exited unexpectedly {SDACCEL}

What might be the reason for this. I have see a blog where SDx IDE can't run printf example code. But I don't have any printf statements in my code.

0 Kudos
5 Replies
Moderator
Moderator
382 Views
Registered: ‎11-04-2010

Re: CPU emulation compute unit exited unexpectedly {SDACCEL}

What's the OS and SDx version you are using?

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor rajuece
Visitor
370 Views
Registered: ‎07-25-2018

Re: CPU emulation compute unit exited unexpectedly {SDACCEL}

I use Ubuntu 16.04 and SDx 2018.3.

0 Kudos
Xilinx Employee
Xilinx Employee
335 Views
Registered: ‎01-12-2017

Re: CPU emulation compute unit exited unexpectedly {SDACCEL}

Hi @rajuece 

This error pops up when there is a memory out of bound access. 

Steps to debug,

  1. Kernel:
    1. Enable line by line in kernel and look for a function that causes this issue
  2. Host:
    1. Disable kernel call (enqueueTask()) and try to reproduce the error.
    2. If not, look for input and output data boundaries.

 

Thanks

Kali

 

 

Visitor rajuece
Visitor
261 Views
Registered: ‎07-25-2018

Re: CPU emulation compute unit exited unexpectedly {SDACCEL}

Hi @kalib 

What do you mean by enable line by line in kernel. I can't add any print statements in the .cl Kernel file. I have tried disabling the clEnqueueNDRangeKernel and I get this warning and the program exits.

 

WARNING: Profiling may contain incomplete information. Please ensure all OpenCL objects are released by your host code (e.g., clReleaseProgram()).
terminate called without an active exception
terminate called recursively

The code works fine on nvidia and amd gpu, it fails only here in the SDAccel tool.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
248 Views
Registered: ‎01-12-2017

Re: CPU emulation compute unit exited unexpectedly {SDACCEL}

Hi @rajuece 

 

1. I assume you are in sw_emu mode, printf is supported for .cl kernels for debugging. Track down the section of code that is failing in iterative manner with print messages in your kernel.

2. Don't disable the NDRange to debug this issue, you must enable the kernel launch. 

3. Work Group/Work Item path is not the right approach for FPGA based OpenCL kernels, unless you are trying to baseport existing .cl kernel to SDAccel environment.

The direct portability of a .cl kernel from GPU to FPGA doesnt exist. It results in worst performance or even design itself may not be built/run on the FPGA card.

 

Link below helps you to understand OpenCL FPGA flow better,

https://github.com/Xilinx/SDAccel_Examples

 

SDAccel Documentation,

https://www.xilinx.com/html_docs/xilinx2018_3/sdaccel_doc/index.html

 

I hope this is useful.

 

Thanks

Kali

0 Kudos