Add a common autograd TLS state (#63860)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63860
Test Plan: Imported from OSS
Reviewed By: heitorschueroff
Differential Revision: D30513253
Pulled By: albanD
fbshipit-source-id: 97d76ed54dfbdf4ba3fc7051ce3b9bb636cefb4b