如何使已编写的并发程序在GPU阵列上运行? [英] How do I make an already written concurrent program run on a GPU array?

查看:146
本文介绍了如何使已编写的并发程序在GPU阵列上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用Erlang编写的神经网络,我刚买了一颗GeForce GTX 260卡,带有240核GPU。使用 CUDA 作为胶水在图形卡上运行是否很简单?

I have a neural network written in Erlang, and I just bought a GeForce GTX 260 card with a 240 core GPU on it. Is it trivial to use CUDA as glue to run this on the graphics card?

推荐答案

不,使用CUDA不是一件小事。

No, using CUDA is not a trivial matter.

CUDA编程模型基本上使用C(还有一些补充),但为了充分利用GPGPU的功能,您必须确保算法遵循CUDA指南。 (请参阅 NVidia CUDA编程指南

The CUDA programming model basically uses C (with some additions) but in order to get the most of the GPGPU's capabilities you would have to ensure that your algorithms follow the CUDA guidelines. (see NVidia CUDA Programming Guide)

例如,为了获得最佳的内存性能(大约70Gbps),您需要以流模式访问内存并进行合并,GPU上的分支也非常昂贵,因此您应该避免条件尽可能多。查看SDK提供的指南和示例,他们将提供一个很好的起点

For example in order to get the best memory performance (somewhere around 70Gbps) you need to access memory in streaming mode with coalescing, also branches are very costly on the GPUs so you should avoid conditionals as much as possible. Check out the guide and samples provided with the SDK, they'll provide an excellent starting point

这篇关于如何使已编写的并发程序在GPU阵列上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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