Unfortunately, I don’t know of a good way to do this. Trying to manage the lifetimes of CUDA tensors across processes is complicated.  I try to only share CUDA tensors that have the same lifetime as the program (like model weights for example).