Prevent CUDAFuture from using uninitialized device index (#51505)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51505
Test Plan: Imported from OSS
Reviewed By: lw
Differential Revision: D26187380
Pulled By: mrshenli
fbshipit-source-id: 437bb1244a65ee859458d9a87fdaef9f4dd20b59