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

Launch time clEnqueueNDRangeKernel

Altera_Forum
Honored Contributor II
1,009 Views

Hi, 

 

On cyclone V SOC, using quartus&AOCL SDK 14.1 build 190, I found about 2ms just for the function call (clEnqueueNDRangeKernel(queue...,0,NULL,NULL) = without events sync, clFinish just before the function call ). 

 

Is it a typical value, and is there a way to improve this value? 

 

Thanks,
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
262 Views

Hello, 

 

A lot happens under the hood when you call clEnqueueNDRangeKernel(). We did not do detailed study of various API latencies but 2ms seems a bit high. Make sure you're using a high-resolution timer (such as getCurrentTimestamp() provided in AOCLUtils that come with all example designs) instead of just clock(). However, if you believe that you have done correct measurements then there is nothing you can do. The only suggestion I have is to allocate a large amount of work to single invocation of clEnqueueNDRangeKernel() so this overhead is amortized.
0 Kudos
Reply