Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 Thrust 与多个 GPU 一起使用?是否只是使用 cudaSetDevice(deviceId) 然后运行相关的推力代码的问题?
使用 CUDA 4.0 或更高版本,cudaSetDevice(deviceId)您的推力代码应该可以工作。
cudaSetDevice(deviceId)
请记住,您需要在每个设备上创建和操作单独的向量(除非您的设备支持对等内存访问并且 PCI-express 带宽足以完成您的任务)。