Note that if you spawn the processes before doing anything cuda related, you won’t see “RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the ‘spawn’ start method” even if you use fork.
I am not sure why you have this behavior with spawn. But multiprocessing in a notebook might be tricky. And you never really kill the python process…