3
I just installed the pycuda on Ubuntu 16.04 and I’m trying to check if it’s working. I’m trying to execute:
#https://documen.tician.de/pycuda/tutorial.html
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;
}
""")
Error:
pycuda.driver.CompileError: nvcc compilation of /tmp/tmpzohid21m/kernel.cu failed
[command: nvcc --cubin -arch sm_61 -I/usr/local/lib/python3.5/dist-packages/pycuda/cuda kernel.cu]
[stderr:
nvcc fatal : Value 'sm_61' is not defined for option 'gpu-architecture'
]
Any idea how to solve?
What version of Cuda ?
– NoobSaibot
@Noobsaibot: CUDA 9.2 Any ideas?
– Ed S
That one Topic it was you who created ? Has this other.
– NoobSaibot
@Noobsaibot: Yes. Only the first No Nvidia forum!
– Ed S
@Noobsaibot: I thought I could install the pycuda and get out using... I’m almost giving up!
– Ed S