CUDA 3.2中的多个GPU以及Cuda 4.0的问题 [英] Multiple GPUs in CUDA 3.2 and issues with Cuda 4.0

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

问题描述

我是多个GPU的新手.我已经为单个GPU编写了代码,并希望通过使用多个GPU进一步提高速度.我正在使用两个GTX 470,MS VS 2008和cuda工具包4.0

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

我面临两个问题.

第一个问题是我的代码无法在4.0构建规则下正常运行,而在3.2构建规则下正常运行.同样,multiGPU的SDK示例也不基于VS2008给出错误

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

错误C3861:'cudaDeviceReset':找不到标识符

error C3861: 'cudaDeviceReset': identifier not found

我的第二个问题是,如果我必须使用3.2,则根据文档,必须分别启动线程并进行单独的分配等.为多个GPU启动线程的最简单的库是什么?举例说明我可以访问多个GPU的设置.

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.

推荐答案

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

The answer to the first question is that you are clearly linking an older version of the CUDA runtime library. cudaDeviceReset is a new addition to the API introduced in CUDA 4.0. So double check the build rules and make sure you really are pointing the linker at the CUDA 4.0 toolkit and not an earlier version

问题的第二部分听起来像是一个"hai plz给我代码"问题,而这实际上并不是这个地方的目的.但是,我将为您提供 GPUWorker 的链接(当前可用的代码此处),这很有帮助基于线程的multigpu框架,该框架最初是HOOMD分子动力学软件包的一部分.它应该为您提供一些有关如何执行多线程,多GPU代码的提示,即使事实证明GPUWorker不能直接满足您的需求.

The second part of your question sounds like a "hai plz give me teh code" question, and that isn't really what this place is for. I will, however, give you a link to GPUWorker (code currently available here), which is a boost threads based multigpu framework that was originally part of the HOOMD molecular dynamics package. It should give you some hints on how to do a multithreaded, multigpu code, even if GPUWorker turns out to not be directly applicable to your needs.

这篇关于CUDA 3.2中的多个GPU以及Cuda 4.0的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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