如何解决Numba中的CudaAPIError:cuModuleLoadDataEx错误:

时间:2019-11-07 09:34:42

标签: python cuda numba

我正在使用Numba CUDA来加速我的程序,但是遇到CUDA API错误,但没有错误消息。这是什么意思?输出如下:

CudaAPIError: cuModuleLoadDataEx error:

由于我试图将结果从一个CUDA内核传递到另一个CUDA,导致出现错误。这是摘要:

Dark_Pix_Search_Kernel[griddim, blockdim](d_all_bands, d_window1, d_result_holder_1)
print("DPS done")
median_filter[griddim, blockdim](d_result_holder_1, d_window1, d_result_holder_2) #<<< error here

d_result_holder_1Dark_Pix_Search_Kernel的结果,然后将其传递到median_filter中。我们不允许这样做吗?

这是完整的追溯

Traceback (most recent call last):

  File "<ipython-input-3-066bf261707a>", line 1, in <module>
    runfile('C:/Users/dmdaz/Google Drive/Academic Files/MSCS/1st Sem19-20/IE 298/python_codes/python_codes - CUDA/Final_code.py', wdir='C:/Users/dmdaz/Google Drive/Academic Files/MSCS/1st Sem19-20/IE 298/python_codes/python_codes - CUDA')

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/dmdaz/Google Drive/Academic Files/MSCS/1st Sem19-20/IE 298/python_codes/python_codes - CUDA/Final_code.py", line 148, in <module>
    median_filter[griddim, blockdim](d_result_holder_1, d_window1, d_result_holder_2)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\compiler.py", line 799, in __call__
    kernel = self.specialize(*args)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\compiler.py", line 810, in specialize
    kernel = self.compile(argtypes)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\compiler.py", line 829, in compile
    kernel.bind()

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\compiler.py", line 543, in bind
    self._func.get()

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\compiler.py", line 430, in get
    module = cuctx.create_module_image(cubin)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\cudadrv\driver.py", line 888, in create_module_image
    module = load_module_image(self, image)

  File "C:\Users\dmdaz\.conda\envs\HazeAwayNew\lib\site-packages\numba\cuda\cudadrv\driver.py", line 952, in load_module_image
    raise CudaAPIError(e.code, msg)

CudaAPIError: cuModuleLoadDataEx error

提前感谢大家

0 个答案:

没有答案