[JIT] mark _exchange_device op as having side effects (#96364)
In #95305 the _exchange_device ops are getting dead-code-eliminated, so they don't get called. #95306 fixes this by using the output of the op, but it's still possible that JIT might reorder the op around other ops.
This PR marks _exchange_device as having side effects so that the ops won't get dead code eliminated or reordered, even if the return is not used.
Differential Revision: [D43966285](https://our.internmc.facebook.com/intern/diff/D43966285)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96364
Approved by: https://github.com/eellison