From numba/numba#9655:
There is currently not a way to pass a NULL pointer to a C function from a compiled python function in CUDA. The value cffi.NULL should be valid in such functions.
For example:
from numba import cuda
import cffi
ffi = cffi.FFI()
func = cuda.declare_device('func', 'int32(CPointer(int32))')
@cuda.jit(link=['/content/func.cu'])
def kernel(values) :
i_thread = cuda.threadIdx.x
values[i_thread] = func(ffi.NULL)
cc @ed-o-saurus