fix a max-autotune rng state related bug (#111381)
Summary:
reland https://github.com/pytorch/pytorch/pull/109828
X-link: https://github.com/pytorch/pytorch/pull/111381
Approved by: https://github.com/lezcano
Reviewed By: jeanschmidt
Differential Revision: D50414092
Pulled By: shunting314
fbshipit-source-id: 60382e2c008ad70687f077abcf4b5641cb5ace0b