Hi,
I have the exact same problem: I’m using processes and gathering tensor results using a queue. When calling backward at the end of the computation, the gradient with respect to the variables used in each process (which exist outside the processes) is None, meaning that pytorch did not see these variables are involved in the gradient computation.
On my side, I noticed that I can compute the gradient in each separate process and return it at the same time as I return the result of the forward, but I guess it would be nice to be able to use .backward() after all the computations are done and in the main thread.