python3.8 64位,cuda版本9.2(推荐版本)运行并列运算出现数据类型错误:
@cuda.jit
def run(a1,a2,a3,a4,lsts_01,lst):
tx= cuda.threadIdx.x # (0-96)
ty= cuda.blockIdx.x # (0-10)
lt = [] #临时装填
lst1=[]
for i in range(1,10):
for lsts in lsts_01:
ls_2 =np.array([a1,a2,a3,a4,ty*10+i,tx+1],dtype = np.int64) <-------第16行
s= np.multiply(lsts,ls_2).sum()
其中a1-a4是主程序中for a1 in range(10):
报错出现:
No implementation of function Function(<built-in function array>) found for signature:
>>> array(list(int64)<iv=None>, dtype=class(int64))
There are 4 candidate implementations:
- Of which 4 did not match due to:
Overload in function '_OverloadWrapper._build.<locals>.ol_generated': File: numba\core\overload_glue.py: Line 131.
With argument(s): '(list(int64)<iv=None>, dtype=class(int64))':
Rejected as the implementation raised a specific error:
NumbaTypeError: Failed in nopython mode pipeline (step: nopython frontend)
Only accept returning of array passed into the function as argument
raised from C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\numba\core\typed_passes.py:150
During: resolving callee type: Function(<built-in function array>)
During: typing of call at C:/Users/Administrator/Desktop/cuda/test.py (16)
我尝试过把第16行”dtype = np.int64“各种更改,np.uint32都不行,实在没办法了,请问如何才能消除这个error?谢谢了!