Unable to use multiprocessing or GNU Parallel with VPI

Using the stereo disparity example provided for VPI 2.3.9, I would like to run this estimation for multiple images at the same time so as to saturate the GPUs and maximize throughput. When I use the example individually everything works as expected, but when the use the same code wrapped with multiprocessing I get VPI initialization errors. If I use GNU parallel to launch the example program, I can run it maximum two jobs, if I use greater than 2 jobs I get similar VPI initialization error.

While GNU Parallel the error is as follows

VPI_ERROR_INVALID_OPERATION: PVA is not available and may be oversubscribed in the system: PvaError_DeviceUnavailable

Hi,

Do you use the PVA backend?
The PVA has a limit (4) on the subscripted processes.

If not, please find the topic below for a workaround:

Thanks.

Hi,

I am using CUDA as the backend and not PVA. Also, the workaround you shared is for code using C++. I am using python. Could you suggest what should I change in this [code](VPI - Vision Programming Interface: Stereo Disparity [its the sample code for stereo that nvidia provides), that will help me enforce CUDA as backend flag while creating images?

Hi @AastaLLL , is there any updates you could share?

Hi @AastaLLL Could you please provide some update on this issue? I would really like to maximize the throughput on the jetson and this issue is blocking me from moving to production

Hi,

Sorry for the late update.

It should work if you create the image with the backend|VPI_BACKEND_CUDA flag.
Could you give it a try?

Thanks.