Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15322 Discussions

Kernel Execution time significantly higher than Kernel profile time

Altera_Forum
Honored Contributor II
888 Views

I am experiencing unexpected behavior when using clWaitForEvents or clFinish. Following is my structure of host code during kernel launch. 

 

for (i = 0; i<10;i++) { 

 

Set kernel Args 

... 

.. 

.. 

clEnqueueNDRange(queue1, Kernel1, ....., &event1); 

clEnqueueTask(queue2, kernel2,............&event2); 

clEnqueueTask(queue3,kernel3,..........&event3); 

 

 

start = time(); 

clFinish(queue3); or clWaitforevents(..., event3); 

end = time(); 

 

Run time = end() - start(); 

 

event1_time += getKernelStartEndTime(event1); 

event2_time += getkernelstartendtime(event2); 

event3_time += getKernelStartEndTime(event3); 

 

Release events... 

.... 

... 

 

I obtain Runtime (8ms) more than event3_time (4ms) in every iteration (factor of 2). I have tried using clFinish() as recommended in https://www.alteraforum.com/forum/showthread.php?t=56633. But I obtain the same results. This doesnt let me launch the kernels of the next iteration just after the previous. There is lot of time gap between kernel launch of one iteration and next. Is it common to obtain high overhead? 

 

 

Am I missing anything while launching kernels?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
121 Views

Mistake from my side - I havent removed the -profile option while compiling.

Reply