Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16613 Discussions

Error after invoking a large number of OpenCL kernels

Altera_Forum
Honored Contributor II
921 Views

Hi,  

 

I'm currently experiencing an error after invoking a large number of the same OpenCL kernels. The OpenCL kernel itself work fine when run on its own. However I need the host program to launch this kernel repeatedly, one after the other.  

 

When I run the host program with a low number of iterations eg 10 (there is 1 kernel invocation per iteration) things work fine. Similarly when I increase the iteration count to 10,000 everything works.  

 

However at 100,000 iterations the program crashes with an "Out of host memory" error. I believe it crashes at around the 20,000th kernel invocation.  

 

I've removed everything from my host program that may growing (in terms of memory footprint), however I still get the same problem.  

 

Does the Altera OpenCL save the kernel or buffer object or similar during its execution. I'm just trying to understand what might be causing this problem.  

 

A possible work around I can think off is to add the iteration loop to the kernel (fpga side) itself however I'd rather not have to do this. Therefore I'd like to understand more about why this problem is occurring before I go down this route.  

 

I'd be grateful for any assistance solving this problem.  

 

Many thanks
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
200 Views

Normally when I see people running into these problems it's because they allocate more resources inside a loop. The resources could be buffers, events, etc... which all have limitations. Knowing which API you are calling when the error code returns would help us identify what you might be running into.

0 Kudos
Reply