有一个不错的 OpenCL 入门套件吗?

发布于 2024-12-28 07:11:33 字数 1459 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

走过海棠暮 2025-01-04 07:11:33

Quartz Composer 确实有一个 OpenCL“补丁”,您可以在其中手动编辑内核。这是一种非常好的方法来试验基于 CL 的顶点或颜色生成等内容,然后您可以将其显示在后续补丁上。一旦你在那里工作了,你通常可以跳转到利用你平台的 CL/GL 互操作工具的纯 C/C++ 代码。

如上所述使用 CL 肯定会让您感受到 OpenCL C 语言。但是,您仍然需要了解 OpenCL 运行时设施。

Quartz Composer does have an OpenCL "patch," in which you can hand-edit your kernel. It's a pretty nice way to experiment with stuff like CL-based vertex or color generation, which you can then display on subsequent patches. Once you get something working there, you can usually make the jump to pure C/C++ code that utilizes the CL/GL interop facilities of your platform.

Using CL as above will definitely give you a feel for the OpenCL C language. You will still need to learn about the OpenCL runtime facilities, however.

少女净妖师 2025-01-04 07:11:33

OpenCL Studio

OpenCL studio 隐藏了您必须通过提供来编写的大部分样板代码基于 Lua 的基础设施——读作:对于主机代码(在 CPU 上运行的代码),您可以使用 Lua 进行编码。它还附带了一堆示例。
GUI 有时感觉有点被黑了。我也没有找到太多关于如何使用软件本身的帮助/文档。
总而言之,我认为它极大地减少了 OpenCL 的学习工作量。

OpenCL Studio

OpenCL studio hides much of the boiler plate code you would have to write by providing a Lua based infrastructure -- read as: for the host code (the code running on the CPU) you can code in Lua. It furthermore comes with a bunch of examples.
The GUI feels sometimes a bit hacked. I also didn't find much help/documentation on how to use the software itself.
All in all I think it dramatically reduces the learning effort of OpenCL.

橘香 2025-01-04 07:11:33

(免责声明:我是 OpenCLHelper 的开发人员)。

我不确定您的具体要求是什么,即,如果您正在寻找 OpenCL 的 IDE,配有调试器等,那么您可以停止阅读此回复。

但是,如果您想要的是一种使用 OpenCL 的方式,样板代码要少得多,并且可以轻松加载内核并向其传递参数,那么您可以考虑 OpenCLHelper

https://github.com/hughperkins/OpenCLHelper

OpenCLHelper:

  • 处理初始化 OpenCL、定位设备的大部分样板文件,创建队列
  • 可以轻松地
  • 使用 clew 向内核传递参数以及从内核接收参数,以便在运行时绑定到 OpenCL,以防万一您需要 OpenCL 成为程序的可选部分,而不是在运行时强制
  • 执行从一个内核获取数据并将其提供给下一个内核相对轻松,无需在 GPU 和 PC 内存之间来回移动

(Disclaimer: I'm the developer of OpenCLHelper).

I'm not sure exactly what your requirements are, ie if you're looking for an IDE for OpenCL, complete with debugger and so on, then you can stop reading this reply.

However, if what you want is a way of using OpenCL with much less boilerplate, and which makes it easy to load kernels, and pass arguments to them, then you might consider OpenCLHelper

https://github.com/hughperkins/OpenCLHelper

OpenCLHelper:

  • handles much of the boilerplate of initializing OpenCL, locating devices, creating queues
  • makes it easy to pass arguments to, and receive arguments from, a kernel
  • uses clew, so that binding to OpenCL is at runtime, just in case you need OpenCL to be an optional part of your program, rather than mandatory at runtime
  • makes it relatively painless to take data from one kernel, and provide it to the next, without moving it back and forwards between GPU and PC memory
棒棒糖 2025-01-04 07:11:33

对于 Windows(Vista、7),请尝试 VS2010 C++ Express

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

以及 AMD App SDK

http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default .aspx

有很多 OpenCL 示例。它可以在过去 7 年内生产的任何 Intel x86 或 x64 CPU 上安装和运行。

For Windows (Vista, 7) try VS2010 C++ Express

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

with the AMD App SDK

http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx

There are lots of OpenCL examples. It installs and runs on any Intel x86 or x64 CPU made in the last 7 years.

等待我真够勒 2025-01-04 07:11:33

一些选项是

AMD APP SDK

AMD APP SDK 附带 OpenCL 编译器、Profiler ,内核分析器。
您还可以尝试 AMD gDEBugger,与 NVIDIA 和 Intel 相比,它可能是 OpenCL GPU 调试的最佳选择。

NVIDIA OpenCL 包

NVIDIA OpenCL 包 您可以注册并下载 opencl 示例、Nsight、Visual profiler 等。

Intel OpenCL SDK

英特尔 OpenCL SDK 是另一种选择(如果您愿意)喜欢在 Sandybridge 处理器上运行您的程序。

COPRTHR SDK

棕鹿科技拥有COPRTHR SDK,其中包含丰富的OpenCL库。

多核工具

另一个选项是多核工具 它结合了 CUDA/OpenCL、Pyon 和 DSL 代码,并为底层硬件生成 ISA。

Some options are

AMD APP SDK

AMD APP SDK comes with OpenCL compiler, Profiler, Kernel Analyzer.
You can also try AMD gDEBugger which is probably the best you can get for OpenCL GPU debugging compared to NVIDIA and Intel.

NVIDIA OpenCL pack

NVIDIA OpenCL pack you can sign up and download opencl samples, Nsight, Visual profiler etc.

Intel OpenCL SDK

Intel OpenCL SDK is another option if you would like to run your programs on Sandybridge processors.

COPRTHR SDK

Brown deer technology has COPRTHR SDK which contains rich set of OpenCL libraries.

Multicoreare Tools

Another option is Multicoreare Tools which combines CUDA/OpenCL, Pyon and DSL Code and generates ISA for the underlaying hardware.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文