pytorch/tools/amd_build
Peter Bell bb119d957e Move torch.cuda's atfork handler into C++ (#29101)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/23401

We cannot rely on `multiprocessing.util.register_after_fork` since it is only
called for processes created by the `multiprocessing` module and not `os.fork()`.

Moving to `pthread_atfork` does always get called. However, I don't think it's safe to call python functions inside of the `atfork` handler so the python code has to be a bit more careful when checking `_initialized`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29101

Differential Revision: D18355451

Pulled By: ezyang

fbshipit-source-id: 4d4253a3669796212c099dad4e5bdfdb0df40469
2019-11-11 07:34:27 -08:00
..
patches Move torch.cuda's atfork handler into C++ (#29101) 2019-11-11 07:34:27 -08:00
build_amd.py Hipify contrib/nccl (#29385) 2019-11-08 10:39:17 -08:00
unwrap_clang.sh Fix compiler unwrapping step in jenkins build scripts for Caffe2/PyTorch on ROCm (#25409) 2019-09-17 13:50:42 -07:00