Pascal_Niville:

To use CUDA with multiprocessing, you must use the ‘spawn’ start method


thanks for posting @Pascal_Niville, this is a known issue for cuda runtime, you can see a related issue here Cannot re-initialize CUDA in forked subprocess · Issue #40403 · pytorch/pytorch · GitHub 13. The workarond is to use “spawn” instead of “fork” as suggested in the error.