I am trying to run the code below but an error is reported:
NvvmSupportError: libNVVM cannot be found. Do conda install
cudatoolkit
: library nvvm not found
My development environment is: Ubuntu 17.04, Spyder/Python3.5 and I have installed via conda (numba and cudatoolkit). Nvidia GPUs (GTX 1070 and GTX 1060).
import numpy as np
from timeit import default_timer as timer
from numba import vectorize
@vectorize(["float32(float32, float32)"], target='cuda')
def VecADD(a,b):
return a+b
n = 32000000
a = np.ones (n, dtype=np.float32)
b = np.ones (n, dtype=np.float32)
c = np.zeros(n, dtype=np.float32)
start = timer()
C = VecADD(a,b)
print (timer() - start)
Does anyone know how to solve this problem?