Fix local version generation (#52898)
Summary:
Add "git" prefix to PyTorch local version, otherwise it might strip leading zeroes from git hashum according to https://www.python.org/dev/peps/pep-0440/#local-version-identifiers:
> If a segment consists entirely of ASCII digits then that section should be considered an integer for comparison purposes
Fixes https://github.com/pytorch/pytorch/issues/52857
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52898
Reviewed By: anjali411
Differential Revision: D26681878
Pulled By: malfet
fbshipit-source-id: 0e7baa2716fc06193cfacd7c4e6cdc6f4bbac4a9