许多OpenCL SDK.我应该选择哪一个? [英] Many OpenCL SDK's. Which of them i should choose?

查看:663
本文介绍了许多OpenCL SDK.我应该选择哪一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在装有Windows 7 OS的计算机中,我有来自该供应商的三个OpenCL SDKS版本:

In my computer with Windows 7 OS I have three versions of OpenCL SDKS's from this vendors:

  • 英特尔
  • NVIDIA
  • AMD.

我用他们每个人构建我的应用程序. 作为输出,我有三个不同的二进制文件. 例如: my_app_intel_x86,my_app_amd_x86,my_app_nvidia_x86

I build my application with each of them. As the output I have three different binaries. For example: my_app_intel_x86, my_app_amd_x86, my_app_nvidia_x86

此二进制文件与此不同:

This binaries are different on this:

  1. 他们在likange流程中使用不同的SDK
  2. 他们试图在运行时找到不同的OpenCL平台名称

我可以仅使用一个SDK并检查平台的运行时间吗?

Can I use only one SDK and check platform on running time?

推荐答案

SDK提供了调试工具,平台和可能的扩展,无论如何,OpenCL API均保持不变.您可以链接到所需的任何SDK,它会生成与您可以找到的任何OpenCL运行时兼容的可执行文件.请记住,那些是针对开发人员的SDK,最终用户可能只会拥有其图形驱动程序(已启用OpenCL),而不必关心您用来构建该软件的SDK.

SDK's give debuggings tools, a platform, and possibly extensions, the OpenCL API remains the same regardless. You can link to any SDK you want, and it'll produce an executable compatible with any OpenCL runtimes you can find. Remember those are SDK's, meant for the developer - the end-user will probably only have his graphics driver (OpenCL-enabled) which doesn't care what SDK you used to build the software.

理想情况下,您应该为程序使用默认平台,但是让用户覆盖它(您可以在运行时选择各种平台!).您还可以使用试探法找出最快的设备,例如:

Ideally you should use a default platform for your program, but let the user override it (you can select various platforms at runtime!). You can also use heuristics to figure out which device is the fastest, e.g.:

  • 在每个可用平台上进行迭代
  • 对于每个平台,在每个设备上进行迭代
  • 以某种相关方式对设备进行基准测试
  • 选择最快的一个

此外,如果您使用的是特定扩展名,请确保仅接受支持扩展名的设备...

Also, if you are using specific extensions, make sure to only accept devices which support them...

我可以仅使用一个SDK并检查平台的运行时间吗?

Can I use only one SDK and check platform on running time?

是的,您绝对可以并且应该这样做,但是我担心检查平台"的含义-如上所述,SDK绝对不会影响您可以在其上运行内置程序的平台.我可以使用AMD SDK构建代码,然后在带有nVidia图形卡或Intel处理器的系统上运行可执行文件(唯一的区别是我可能无法访问由我提供的AMD特定扩展) SDK,但是扩展将被AMD驱动程序识别,因此您甚至不需要安装SDK即可运行代码-但您可以构建它.)

Yes, you absolutely can and should do that, but I am worried about what you mean by "check platform" - as I stated above, the SDK bears absolutely no influence on the platforms you can run your built program on. I can build my code with the AMD SDK, and run the executable on a system with an nVidia graphics card or an Intel processor just fine (the only difference is that I may not have access to AMD-specific extensions which will be provided by my SDK, but the extensions will be recognized by an AMD driver, so you don't even need the SDK installed to run the code - but you will to build it though).

这篇关于许多OpenCL SDK.我应该选择哪一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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