CUDA 9.0 and pycuda, error:CompileError: nvcc compilation … kernel.cu failed
问题 import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import SourceModule import numpy a = numpy.random.randn(4,4) a = a.astype(numpy.float32) a_gpu = cuda.mem_alloc(a.nbytes) cuda.memcpy_htod(a_gpu, a) mod = SourceModule(""" __global__ void doublify(float *a) { int idx = threadIdx.x + threadIdx.y*4; a[idx] *= 2; } """) I just installed CUDA 9.0 and pycuda, and I am following the tutorial to run the first cuda program. But it always turns out error: CompileError: nvcc