pycuda; nvcc fatal : Visual Studio configuration file '(null)' could not be found

六月ゝ 毕业季﹏ 提交于 2019-12-01 20:41:07

问题


I'm trying to run pycuda introductory tutorial after installing Visual C++ Express 2010 and all kinds of Nvidia drivers, SDK, etc. I get to

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

without errors. But this call in IPython yields

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/../..']

After this I installed MS Windows SDK without impact on this error, although I now seem to be able to choose x64 programs in Visual C++ Express 2010. So, what do I need to fix? (I used precompiled pycuda files.)


回答1:


In stackoverflow post CUDA linking error - Visual Express 2008 - nvcc fatal due to (null) configuration file the answer by Amitabh Mritunjai fixed this error. He explains the steps for Visual C++ Express 2010 while the most of the rest of the post is about 2008.



来源:https://stackoverflow.com/questions/10343401/pycuda-nvcc-fatal-visual-studio-configuration-file-null-could-not-be-foun

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!