在混合供应商的硬件上运行OpenCL [英] Running OpenCL on hardware from mixed vendors

查看:54
本文介绍了在混合供应商的硬件上运行OpenCL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在他们的Stream 2.0 beta中使用ATI OpenCL实现.当前Beta版中的OpenCL目前仅使用CPU,下一个版本应该支持GPU内核.我下载Stream是因为我的工作机中装有ATI GPU.

I've been playing with the ATI OpenCL implementation in their Stream 2.0 beta. The OpenCL in the current beta only uses the CPU for now, the next version is supposed to support GPU kernels. I downloaded Stream because I have an ATI GPU in my work machine.

我编写的软件将通过使用GPU获得巨大收益.但是,该软件可以在客户计算机上运行,​​我没有奢望(像许多科学计算环境一样)选择要开发的硬件并为此进行优化.所以我的问题是,如果我将ATI OpenCL实现与我的应用程序一起分发,那将意味着它将永远无法使用例如NVidia视频卡?而且,如果我使用NVidia OpenCL SDK,那么它将永远无法在AMD芯片上最佳运行(考虑到ATI/AMD链接)?

I write software that would benefit hugely from gains by using the GPU. However this software runs on customer machines, I don't have the luxury (as many scientific computing environments have) to choose the exact hardware to develop for, and optimize for that. So my question is, if I distribute the ATI OpenCL implementation with my application, will that mean it will never be able to use e.g. NVidia video cards? And if I use the NVidia OpenCL SDK, that it will never run optimally on AMD chips (considering the ATI/AMD link)?

换句话说,到底谁负责提供OpenCL实现?用户将能够例如为NVidia视频卡安装OpenCL驱动程序",以及为其提供在AMD CPU上最佳性能的驱动程序"?

On other words, who is in the end responsible for providing the OpenCL implementation? Will users be able to e.g. install an OpenCL 'driver' for their NVidia video card, alongside a 'driver' that gives them optimal performance on their AMD CPU?

顺便说一句,除了Khronos留言板之外,是否还有针对OpenCL的良好/主动支持论坛,或者这是一个可以去的地方?我已经看到ATI有一个董事会,而NVidia大概有自己的董事会,OpenCL用户/开发人员社区在哪里闲逛?它已经合并到一个地方了吗?

As an aside, are there any good/active support forums for OpenCL apart from the Khronos message boards, or is that the place to go? I've seen that ATI has a board, and NVidia presumably has their own, where does the OpenCL user/developer community hang out? Has it already consolidated into one place?

推荐答案

最终,OpenCL的工作方式与OpenGL相同.也就是说,用户将从其硬件供应商(ATI,NVIDIA,Intel)安装当前的驱动程序.作为开发人员,您在构建应用程序时将仅链接到OpenCL库.当用户运行您的应用程序时,该应用程序将重定向到驱动程序提供的适当的特定于供应商的库.

Ultimately, OpenCL will work the same way as OpenGL. That is, users will install the current drivers from their hardware vendors (ATI, NVIDIA, Intel). You as the developer will simply link against an OpenCL library when building your applications. When users run your application, the application will redirect to the appropriate vendor specific libraries provided by the drivers.

这是它的工作方式,但还不能以这种方式工作.

This is the way it will work, but it does not yet work in this way.

要记住的另一件重要的事情是,您可能仍必须提供供应商特定的代码路径,因为使用OpenCL在CPU上运行的代码可能会使用与在GPU上运行的代码不同的优化内核参数. GPU供应商之间的差异可能也是如此.

Another important thing to keep in mind is that you will still probably have to provide vendor specific code paths as code running on the CPU using OpenCL will probably use different optimized kernel parameters than code running on the GPU. The same is probably true for differences between GPU vendors.

这篇关于在混合供应商的硬件上运行OpenCL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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