我是Python中NumbaPro的新手。我有以下代碼,我想在CUDA(Anaconda Accelerate)的x,y網格中並行化,但是每次運行它時,它都會在Decorator行中出現NotImplementedError,我不確定有什麼不對,有人可以幫助我嗎?非常感謝:NumbaPro(Python)裝飾器的NotImplementedError
@cuda.jit(argtypes=(float64[:,:], float64[:,:,:], float64, float64, float64), device=True)
def computeflow(PMapping2, Array_hist2, Num_f1, p_depth1, image_width1):
x, y = cuda.grid(2);
for y in xrange(0,p_depth1):
for x in xrange(0,image_width1):
Array_H, bin_edges = numpy.histogram(Array_hist2[y,x,:], bins=Num_f1, range=None, normed=False, weights=None, density=None);
Array_H = (numpy.imag(numpy.fft.ifft(Array_H,n=1024)));
Array_H1 = Array_H[0:len(Array_H)/2];
Array_H1[20:1024] = 0;
PMapping2[y,x] = numpy.sum(Array_H1);
Mapping1=cuda.to_device(PMapping);
Array_hist1=cuda.to_device(Array_hist);
computeflow[(3,3),(3,3)](PMapping, Array_hist, Num_f, p_depth, image_width);
PMapping1.to_host();
可能意味着您使用的功能尚未在numbapro中實現。它仍在開發中,所以還有一些缺失的東西。錯誤消息是否說明了什麼沒有實現? – M4rtini
NotImplementedError:offset = 203 opcode = 2b opname = STORE_SLICE + 3 這是我得到的錯誤,謝謝! – Kyle