Add environment parse function that supports default value (#85563)
We use "-2" to represent an unset environment variable.
Now adding a util function to attach default value if environment variable is unset.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85563
Approved by: https://github.com/rohan-varma, https://github.com/H-Huang