Refactor: use version instead of major version in windows build (#49156)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/49219
1. update version instead of major version for env var of CUDA_VERSION
2. update related scripts
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49156
Reviewed By: glaringlee
Differential Revision: D25535530
Pulled By: ezyang
fbshipit-source-id: 0712227f2b06b45ee68efc42717c4308fea1abdc