[JIT] Update set_stream API to change the device (#53741)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/53741
Test Plan: Imported from OSS
Reviewed By: pbelevich
Differential Revision: D26970606
Pulled By: nikithamalgifb
fbshipit-source-id: 257b9425d105a68fc9ef567af266fa461ddf05ec