OpenCL可以带来什么样的工作 [英] What kind of work benifits from OpenCL

查看:109
本文介绍了OpenCL可以带来什么样的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先:

  • 我很清楚,OpenCL不能神奇地使一切变得更快
  • 我很清楚OpenCL有局限性

所以现在我的问题是,我习惯于使用编程来进行不同的科学计算.关于计算的复杂性和数量,我从事的一些工作非常紧张.所以我想知道,也许我可以使用OpenCL来加快处理速度.

So now to my question, i am used to do different scientific calculations using programming. Some of the things i work with is pretty intense in regards to the complexity and number of calculations. SO i was wondering, maybe i could speed things up bu using OpenCL.

因此,我很想听听大家的回答,其中包括以下一些[链接奖励]:

So, what i would love to hear from you all is answers to some of the following [bonus for links]:

*哪种计算/算法/一般问题适合OpenCL

*What kind of calculations/algorithms/general problems is suitable for OpenCL

*确定某些特定代码是否会因迁移到OpenCL而受益的一般准则是什么?

*What is the general guidelines for determining if some particular code would benefit by migration to OpenCL?

致谢

推荐答案

我认为这是一个好问题,这也是我也想为自己的研究而解决的问题.

I think this is a good question, and it's something I'm trying to work out for my own research as well.

目前,在GPU的功能方面存在严格的限制,因为它们需要各个线程在不同的数据集上执行完全相同的代码,即问题/算法必须是数据并行"的.显然,数据并行问题包括蒙特卡洛模拟(其中许多MC模拟是并行执行的),图像处理以及不太明显的分子动力学模拟.数值积分(蒙特卡洛或其他方法)是另一种科学应用程序,可以很容易地移植到在GPU上运行.

There are, at the moment, strong limitations in terms of what GPUs can do, as they require individual threads to execute exactly the same code on different sets of data, i.e. the problem / algorithm must be "data parallel". Obviously data parallel problems include Monte Carlo simulations (where many MC simulations are executed in parallel), image processing, and less obviously molecular dynamics simulations. Numerical integration (Monte Carlo or otherwise) is another scientific application which can be easily ported to running on a GPU.

另一个主要限制是每个线程的内存非常有限,因此要在GPU上有效执行,该算法必须具有较高的算术强度.要使算法成为可在GPU上运行的候选方法的必要但不充分的条件是,在CPU上,算法必须严格地受CPU约束,而不是受内存约束.

The other main restriction is that memory per thread is very limited, and so to be efficiently executed on a GPU the algorithm must have high arithmetic intensity. A necessary but not sufficient condition for an algorithm to be a candidate for running on a GPU is that on the CPU the algorithm must be strongly CPU bound rather than memory bound.

我的观点是,随着时间的流逝,越来越多的问题将shoe之以鼻,以便可以使用这种范式解决这些问题,因为它们将获得如此大的性能提升,但是显而易见的是,低挂果并行问题.我认为,在未来十年中,大规模多核编程将在科学界变得越来越重要和普遍.

My view is that as time goes on, more and more problems will be shoehorned so that they can be solved using this paradigm just because there is such a large performance gain to be made, but the low hanging fruit are the obviously data parallel problems. Massively multicore programming is, in my view, going to be increasingly important and prevalent in scientific circles over the next decade.

我已经解决了这个问题,并设法将回溯问题转换为适当的格式,以便在GPU上执行(使用CUDA).仅供参考,我在一次演讲中对此进行了描述: http ://lattice.complex.unimelb.edu.au/home/sites/default/files/mydocuments/clisby_cuda0509.pdf

I've played around with this a bit, and managed to shoehorn a backtracking problem into an appropriate format for executing on a GPU (using CUDA). FYI, I describe this in a talk: http://lattice.complex.unimelb.edu.au/home/sites/default/files/mydocuments/clisby_cuda0509.pdf

这篇关于OpenCL可以带来什么样的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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