pycuda; nvcc fatal : Visual Studio configuration f

2019-02-24 02:50发布

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条回答
放荡不羁爱自由
2楼-- · 2019-02-24 02:52

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.

查看更多
登录 后发表回答