Okay, I found there’s already well documented answer at https://pytorch.org/docs/stable/notes/multiprocessing.html 55.
And also with hogwild!-spirit, it’s fine to overwrite gradient from other process.
So the only thing I wonder now is that how the updating shared model parameter 14 could be done without any lock mechanism. Are the add_ or addcdiv_ atomic operation?