Using Multiprocessing in Pycuda

I wrote pycuda program for my application but when I tried to run with multiple processes, I am getting pycuda._driver.LogicError: cuModuleGetFunction failed: initialization error.

I am using import pycuda.autoinit. Could you guide me how to initialize for various processes in Py-Cuda ?

How many GPUs do you have? Are these sharing a single GPU? If so, what is the compute mode of that GPU set to?

I use only single GPU which is Gtx 1070 and the computing mode is default set to 0.

This may explain what you are doing wrong:

For example, I wouldn’t use autoinit, and I would be sure not to init CUDA in the master process.

I had a similar issue, and solve it by adding a line of code on the main process, before start the subprocesses:


Source: []