Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Launch time clEnqueueNDRangeKernel

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,

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.