[RELAND] [CUDA graphs] Make CUDAGeneratorImpl capturable (ci-all edition) (#48694)
Summary:
Resubmission of https://github.com/pytorch/pytorch/pull/47989 with attempted fix for the unexpected context creation that caused revert (https://github.com/pytorch/pytorch/pull/47989#issuecomment-736689145).
Submitting from a ci-all branch because the failing test isn't public.
Diffs relative to master should be the same as https://github.com/pytorch/pytorch/pull/47989 's approved diffs, aside from the fix itself https://github.com/pytorch/pytorch/pull/48688/commits/a5c80f63d3aae66d691bbafc726615e9be8e68be.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48694
Reviewed By: mruberry
Differential Revision: D25291431
Pulled By: ngimel
fbshipit-source-id: 8c27f85c64eecaf1f5cb925020fa6d38a07ff095