编程语言
首页 > 编程语言> > python – pycuda; nvcc致命:无法找到Visual Studio配置文件'(null)’

python – pycuda; nvcc致命:无法找到Visual Studio配置文件'(null)’

作者:互联网

我正在尝试在安装Visual C Express 2010和各种Nvidia驱动程序,SDK等后运行pycuda introductory tutorial.我到了

mod = SourceModule("""
__global__ void doublify(float *a)
{
int idx = threadIdx.x + threadIdx.y*4;
a[idx] *= 2;
}
""")

没有错误.但是在IPython中的这个调用产生了

CompileError: nvcc compilation of c:\users\koj\appdata\local\temp\tmpbbhsca\kernel.cu failed
[command: nvcc --cubin -arch sm_21 -m64 -IC:\Python27\lib\site-packages\pycuda\..\..\..\include\pycuda kernel.cu]
[stderr:
nvcc fatal   : Visual Studio configuration file '(null)' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../..']

在此之后我安装了MS Windows SDK而没有对此错误产生影响,虽然我现在似乎能够在Visual C Express 2010中选择x64程序.那么,我需要修复什么? (我使用了预编译的pycuda文件.)

解决方法:

CUDA linking error – Visual Express 2008 – nvcc fatal due to (null) configuration file之后的stackoverflow中,Amitabh Mritunjai的答案修复了这个错误.他解释了Visual C Express 2010的步骤,而其余的大部分内容都是关于2008年的.

标签:python,cuda,pycuda,nvcc
来源: https://codeday.me/bug/20190621/1250049.html