how to profile sequential launched multiple OpenCL kernels by one clFinish?

*爱你&永不变心* 提交于 2019-12-03 16:46:19

Each clEnqueueNDRangeKernel will create its own cl_event: the last arg of the call is a pointer to a cl_event; if this last arg is not 0, a new event will be created.

After a command has completed, the associated event can be queried the start/end profiling info. This event must be released after use (call clReleaseEvent).

clFinish blocks until all enqueued commands are completed.

You need only one call to clFinish, and then you can query profiling info for all events.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!