如何知道OpenCV 3.0算法在透明API中是否具有OpenCL实现 [英] How to know if an OpenCV 3.0 algorithm has an OpenCL implementation in the transparent API

查看:53
本文介绍了如何知道OpenCV 3.0算法在透明API中是否具有OpenCL实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将自己的OpenCV 2.4.2迁移到OpenCV 3.0,以通过透明API使用OpenCL性能.但是,我注意到某些算法在CPU或GPU实施中花费相同的时间.
我搜索了官方文档,但没有找到答案. 如何知道算法在透明API中是否具有自动OpenCL转换?

I am migrating my OpenCV 2.4.2 to OpenCV 3.0 for using OpenCL performance throught the Transparent-API. But, I note that some algorithms take the same time in CPU or GPU implementation.
I searched in the official documentation, but I didn't find the answer. How to know if an algorithm has an automatic OpenCL translation in the Transparent API or not ?

推荐答案

如果您有amd gpu,请使用codexl并创建一个新的codexl项目,附加您的项目并从codexl开始会话,或者从IDE和将codexl附加到其运行时.然后,当程序完成时,codexl会自动最终生成必要的图形和性能分析信息(如果您选择适当的gpu性能分析模式).

If you have amd gpu, use codexl and create a new codexl project, attach your project and start session from codexl, or, start your project from your IDE and attach codexl to runtime of it. Then when program finishes, codexl automatically generates necessary graph and profiling info(if you choose proper gpu profiling modes) in the end.

我曾经使用Codexl来了解compubench.com如何处理工作组大小.(由于内存资源需求,有时是32个)

I used codexl once to know how compubench.com handles workgroup sizes.(it was 32 on an occasion because of memory resource requirements)

如果不使用opencl,codexl会通过一个对话窗口通知您,提示可能的原因.

If it doesn't use opencl, codexl informs you with a dialog window telling potential causes.

您甚至可以知道错误,以这种方式发出警告并查看内核字符串(但可能已损坏).

You can even know errors, warnings this way and look at kernel string(but mangled probably).

英特尔具有代码构建器

Nvidia也有一些分析器.

Nvidia has some profilers too.

这篇关于如何知道OpenCV 3.0算法在透明API中是否具有OpenCL实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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