OpenCL性能评估 [英] OpenCL performance measurement

查看:110
本文介绍了OpenCL性能评估的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

呈现OpenCL应用程序(尤其是计算内核)性能的最合适方法是什么? 我已经实现了一些算法,并且正在考虑呈现速度和效率图表,但是根据定义,我需要知道我在计算中使用了多少个处理器.如果使用OpenCL,则无法完成.

What is the most appropriate method to present a performance of OpenCL application (especially computing kernels)? I have implemented some algorithms and I was thinking about presenting speed-up and efficiency charts, but according to the definition I need to know how many processors I have used in calculations. In case of OpenCL it can not be done.

推荐答案

创建带有CL_QUEUE_PROFILING_ENABLE标志集的命令队列,然后使用clGetEventProfilingInfo提取时序数据.有关更多详细信息,请参见"OpenCL编程指南"的第9章.

Create your command queue with the CL_QUEUE_PROFILING_ENABLE flag set, then use clGetEventProfilingInfo to extract timing data. See Chapter 9 of "OpenCL Programming Guide" for more details.

这篇关于OpenCL性能评估的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆