Change current device in stream context manager if necessary (#16128)
authorShen Li <shenli@fb.com>
Fri, 18 Jan 2019 20:32:20 +0000 (12:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 18 Jan 2019 20:39:51 +0000 (12:39 -0800)
commit292edfb0879cb2ae9377637eadd282dfb6daea33
tree926fc7462d3634b1990ecc58772e0e7a8a7d36ba
parenteea50e91fa6fbcfef59b6a252c5ec5f9400e1ac2
Change current device in stream context manager if necessary (#16128)

Summary:
Fixes #16019
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16128

Differential Revision: D13721850

Pulled By: mrshenli

fbshipit-source-id: 422c6c0b97c1cd46e127e265b532cb8c74a3aac5
test/test_cuda.py
torch/csrc/cuda/Module.cpp
torch/cuda/__init__.py