带有基准测试的 OpenCL 示例

发布于 2024-08-04 22:31:14 字数 236 浏览 1 评论 0原文

我正在寻找一些 OpenCL 的介绍性示例,这些示例说明了可以实现速度大幅提升(例如 50 倍至 1000 倍)的应用程序类型。 Cuda 有很多很好的例子,但我还没有为 OpenCL 找到同样的东西。

一个很好的例子可能是通过粒子群、模拟退火、进化算法、蚁群优化等对复杂函数进行全局优化。

I'm looking for some introductory examples to OpenCL which illustrate the types of applications that can experience large (e.g., 50x-1000x) increases in speed. Cuda has lots of nice examples, but I haven't found the same thing for OpenCL.

A nice example might be global optimization of complex functions via particle swarms, simulated annealing, evolutionary algorithms, ant colony optimization, etc.

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

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

发布评论

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

评论(4

梦里梦着梦中梦 2024-08-11 22:31:14

从 GPU 编程的角度来看,您描述的算法既不简单也不具有介绍性。 CUDA 在这些领域拥有示例的原因是,它已经存在了足够长的时间,人们已经开发了这些示例。目前还没有在 GPU 上运行的 OpenCL 的公开版本。 ATI 和 NVIDIA 都提供其 OpenCL 驱动程序的 Beta 版本,但 ATI 仅支持 CPU 计算,而 NVIDIA 则需要签署 NDA 才能获得。简而言之,OpenCL 出现的时间还不够长,还不足以开发和演示此类综合示例。

也就是说,访问 NVIDIA 的 OpenCL 驱动程序并不困难。您可以在此处的论坛上了解如何执行此操作。我假设 OpenCL 发行版包含一些示例程序来帮助您入门。

这也意味着这是您开发其中一些基准并发布结果的绝佳机会。然后人们会提及你的工作,而不是你提及他们的工作。不过我不会期待太多惊喜。一旦 OpenCL 得到广泛使用和支持,其性能应该与 CUDA 性能大致相当。

The algorithms you are describing are neither simple nor introductory from the perspective of GPU programming. The reason CUDA has examples in these areas is that it has been around long enough for people to have developed these examples. There is currently no publicly available version of OpenCL that runs on GPUs. Both ATI and NVIDIA are offering beta versions of their OpenCL drivers, but ATI's supports only CPU computation and NVIDIA's requires signing an NDA to get. Simply put, OpenCL has not been around long enough for comprehensive examples like these to have been developed and demonstrated.

That said, gaining access to NVIDIA's OpenCL drivers is not difficult. You can find out how to do so on their forums here. I assume that the OpenCL distribution contains some sample programs to help you get started.

This also means that it's an excellent opportunity for you to develop some of these benchmarks and post your results. Then people will refer to your work rather than you referring to their work. I wouldn't expect too many surprises though. OpenCL performance should be roughly on par with CUDA performance once it becomes widely available and supported.

别闹i 2024-08-11 22:31:14

以下是 nvidia SDK 中的一些很好的示例:

http://developer.nvidia.com /object/get-opencl.html

The are some great examples in the SDK from nvidia:

http://developer.nvidia.com/object/get-opencl.html

场罚期间 2024-08-11 22:31:14

我们的团队一直在研究 OpenCL 算法和加速,我们想推荐这篇文章

http://www.cmsoft.com.br/index.php?view=article&catid=1:latest-news&id=247:opencl -simulated-annealing

作为最小化模拟退火算法的示例实现。

Our team has been working on OpenCL algorithms and acceleration and we would like to suggest the article

http://www.cmsoft.com.br/index.php?view=article&catid=1:latest-news&id=247:opencl-simulated-annealing

as a sample implementation of Simulated Annealing algorithm for minimization.

謌踐踏愛綪 2024-08-11 22:31:14

您可以尝试以下两本书:

大规模并行处理器编程 ... 实践方法 (NVIDIA)(第 1 章和第 2 章)

OpenCL 编程书籍 ... 多核 CPU 和 GPU 的并行编程(历史组件

两者都有详细介绍)为了解释为什么要进行开发以及在哪里可以找到真正的好处,

但不确定基准测试,我自己也没有任何运气。

You could try the following two books:

Programming Massively Parallel Processors ... A Hands-on Approach (NVIDIA)(chapter 1 and 2)

The OpenCL Programming Book ... Parallel Programming for MultiCore CPU and GPU (History components

Both go in detail as to explain why the development was made and where the true bonusses can be found.

Not sure about benchmarking though , haven't had any luck there myself either.

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