Make test_cuda.py work on Python 2. (#21466)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21466
ghimport-source-id: 0a235c8b8cf994621a5a5afe022340dd35764c91
Differential Revision: D15698096
Pulled By: ezyang
fbshipit-source-id: 1759c2681071e9c7e83de3de86daf4333c5f8f3a