Pycuda: сбой cuTexRefSetArray: одноранговый доступ не включен

Код, как показано ниже:

cuda.init()
dev = cuda.Device(0)
context = dev.make_context()
context.push()
tfG = mod.get_texref("tfG")
tfG.set_array(cuda.np_to_array(Gs.astype(np.float32),order='C'))
context.pop()

дает мне сообщение об ошибке:

    ---------------------------------------------------------------------------
LogicError                                Traceback (most recent call last)
<ipython-input-41-92ff15f5e108> in <module>()
      1 Gs = np.arange(100).reshape([10,10])
      2 context.push()
----> 3 tfG.set_array(cuda.np_to_array(Gs.astype(np.float32),order='C'))
      4 context.pop()

LogicError: cuTexRefSetArray failed: peer access has not been enabled

Я прочитал подобную тему, но не решил эту ошибку

P.S. с автоматической инициализацией это будет работать:

import pycuda.autoinit
tfG = mod.get_texref("tfG")
Gs = np.arange(100).reshape([10,10])
tfG.set_array(cuda.np_to_array(Gs.astype(np.float32),order='C'))

Но моя проблема в том, что я хочу использовать mpi для своей программы, поэтому мне нужно выяснить, почему это не работает.


person Henry Liu    schedule 29.11.2018    source источник