I've been studying numba and tried to run this code:
import numpy as np
from numba import jit, cuda, vectorize
import math
@cuda.jit
def increment_a_2D_array(an_array):
x, y = cuda.grid(2)
if x < an_array.shape[0] and y < an_array.shape[1]:
an_array[x, y] += 1
an_array = np.ones((10,10))
threadsperblock = (16, 16)
blockspergrid_x = math.ceil(an_array.shape[0] / threadsperblock[0])
blockspergrid_y = math.ceil(an_array.shape[1] / threadsperblock[1])
blockspergrid = (blockspergrid_x, blockspergrid_y)
increment_a_2D_array[blockspergrid, threadsperblock](an_array)
So when i run the code above it returns the following error:
CudaAPIError: Call to cuLinkCreate results in CUDA_ERROR_LAUNCH_TIMEOU
What could it be?