多个GPU与Cuda推力? [英] Multiple GPUs with Cuda Thrust?

查看:155
本文介绍了多个GPU与Cuda推力?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在多个GPU上使用Thrust?
只是使用cudaSetDevice(deviceId)
,然后运行相关的Thrust代码?

How do I use Thrust with multiple GPUs? Is it simply a matter of using cudaSetDevice(deviceId) and then running the relevant Thrust code?

推荐答案

p>使用CUDA 4.0或更高版本, cudaSetDevice(deviceId)后跟您的推力代码应该工作。

With CUDA 4.0 or later, cudaSetDevice(deviceId) followed by your thrust code should work.

请记住,您需要在每个设备上创建和操作单独的矢量(除非您有支持对等内存访问和PCI-快速带宽足以满足您的任务)。

Just keep in mind that you will need to create and operate on separate vectors on each device (unless you have devices that support peer-to-peer memory access and PCI-express bandwidth is sufficient for your task).

这篇关于多个GPU与Cuda推力?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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