Fix backcompat in master following revert (#46984)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46984
Reviewed By: mrshenli
Differential Revision: D24592404
Pulled By: albanD
fbshipit-source-id: d317d934b650f1ac0f91e51ef5cbc14e886aa3fe