Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,108 Views

OpenCL kernel finish event never occurs

I have a SoC design using Quartus 16.0. In the design, the ARM allocates a few buffers (cl_mem objects) using OpenCL. The physical address of those buffers are given to an mSGDMA core to capture data collected by the FPGA. This is to negate the need to copy data. On interrupt from the mSGDMA, the ARM passes the cl_mem object for that buffer to an OpenCL kernel to process the data. 

 

Using memtool to look at the contents of RAM, I can see the data has been completely processed by the OpenCL kernel. /proc/interrupts also shows an interrupt occurred for the aclsoc driver but the call to clWaitForEvents with the kernel's finish event never returns. 

 

Unfortunately, I don't have a minimal example to replicate the behavior at this time. Are there any common causes I may be overlooking for the kernel not formally finishing?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
87 Views

The only case of kernel deadlocks I have encountered were caused by channel ordering in multi-kernel designs. You seem to be mixing HDL and OpenCL; I guess there are a lot more stuff that could go wrong in that case. If the whole reason for mixing HDL with OpenCL for you is to avoid the extra buffer copy, you can already do that in pure OpenCL.

Altera_Forum
Honored Contributor I
87 Views

 

--- Quote Start ---  

The only case of kernel deadlocks I have encountered were caused by channel ordering in multi-kernel designs. You seem to be mixing HDL and OpenCL; I guess there are a lot more stuff that could go wrong in that case. If the whole reason for mixing HDL with OpenCL for you is to avoid the extra buffer copy, you can already do that in pure OpenCL. 

--- Quote End ---  

 

 

Thank you for the reply. 

 

The design has a pipeline implemented in HDL to collect data through a custom interface in the FPGA fabric. The goal was to reuse the existing, custom interface for collecting data and leverage OpenCL to post-process the captured data as a separate data path. Curiously, the data in RAM is entirely processed but the ARM application deadlocks waiting for the kernel's finish event.
Reply