2

我不想安装整个 VS,特别是因为它会占用我大部分的 C 空间,所以我抓住了 SDK。我还安装了 cuda SDK。我遇到了一个相当荒谬的问题:

d:\cuda\class>nvcc --cubin unit1-1.cu
unit1-1.cu
unit1-1.cu
tmpxft_00001224_00000000-5_unit1-1.cudafe1.gpu
tmpxft_00001224_00000000-11_unit1-1.cudafe2.gpu
'nvopencc' is not recognized as an internal or external command,
operable program or batch file.

d:\cuda\class>nvopencc
nvopencc: no input files
For general help: nvopencc --help
To search help: nvopencc -help:<string>

它是说 nvopencc 不是一个有效的命令,但我可以运行它!任何人都知道如何解决这个问题?我--cubin在某个地方找到了一个命令,并希望它会起作用......我不知道它是否应该在那里。无论如何,无论有没有我都会遇到同样的错误。

4

1 回答 1

4

这是对 nvcc.exe 的典型调用,由 Visual Studio 2010 生成。看起来您需要指定编译器二进制文件的位置。

nvcc.exe -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2010 -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC \bin" -I"\C\common\inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA \v5.0\include" --keep --keep-dir "Release" -maxrregcount=0 --machine 32 --compile -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MD " -o "发布\kernel.cu.obj" "c:\test_cuda\test_cuda\kernel.cu"

于 2013-02-11T01:31:26.447 回答