1

I am new to multiple GPUs. I have written a code for a single GPU and want to further speed up by use of multiple GPUs. I am working with two GTX 470 with MS VS 2008 and cuda toolkit 4.0

I am facing two problems.

First problem is my code somehow doesn't run fine with 4.0 build rules and works fine for 3.2 build rules. Also the SDK example of multiGPU doesn't build on VS2008 giving error

error C3861: 'cudaDeviceReset': identifier not found

My second problem is, if I have to work with 3.2 then according to the documentation, threads have to be launched separately and separate allocations to be made etc. What is the easiest library for launching threads for multiple gpus and can you please give some example for my setup for access to multiple GPUs.

4

1 回答 1

2

第一个问题的答案是您显然在链接旧版本的 CUDA 运行时库。cudaDeviceReset是 CUDA 4.0 中引入的 API 的新增功能。因此,请仔细检查构建规则并确保您确实将链接器指向 CUDA 4.0 工具包而不是早期版本

您问题的第二部分听起来像是“请给我代码”的问题,而这并不是这个地方的真正用途。然而,我会给你一个GPUWorker的链接(代码目前在此处可用),它是一个基于 boost 线程的 multigpu 框架,最初是 HOOMD 分子动力学包的一部分。它应该为您提供一些关于如何编写多线程、多 GPU 代码的提示,即使 GPUWorker 最终不能直接满足您的需求。

于 2011-08-13T11:34:08.340 回答