Ошибка подтверждения при запуске numba с target = "cuda" - PullRequest
0 голосов
/ 30 января 2019

У меня есть следующий код, который я пытаюсь запустить с помощью cuda.Он работает с target = 'cpu' и target = 'parallel', но выдает ошибку с target = 'cuda'

Я запустил numba -s на терминале и показывает, что все в порядке.

@vectorize([float64(float64), float32(float32)], target='cuda', nopython=True)
def closestDist(rij):
    global gridsize
    if (rij > gridsize / 2):
        rij -= gridsize
    elif (rij < -gridsize / 2):
        rij += gridsize
    return rij

Вот ошибка, которую я получаю

AssertionError                            Traceback (most recent call last)
<ipython-input-3-85ebdde41444> in <module>
      1 #helper function to calculate closest manhattan distance between two particles in line with PBC
----> 2 @vectorize([float64(float64), float32(float32)], target='cuda', nopython=True)
      3 def closestDist(rij):
      4     global gridsize
      5     if (rij > gridsize / 2):

~/.local/lib/python3.6/site-packages/numba/npyufunc/decorators.py in wrap(func)
    116 
    117     def wrap(func):
--> 118         vec = Vectorize(func, **kws)
    119         for sig in ftylist:
    120             vec.add(sig)

~/.local/lib/python3.6/site-packages/numba/npyufunc/decorators.py in __new__(cls, func, **kws)
     36         cache = cls.get_cache(kws)
     37         imp = cls.get_target_implementation(kws)
---> 38         return imp(func, identity=identity, cache=cache, targetoptions=kws)
     39 
     40 

~/.local/lib/python3.6/site-packages/numba/npyufunc/deviceufunc.py in __init__(self, func, identity, cache, targetoptions)
    364         if cache:
    365             raise TypeError("caching is not supported")
--> 366         assert not targetoptions
    367         self.py_func = func
    368         self.identity = parse_identity(identity)

AssertionError: 
...