Previous code path was doing an unnecessary cuda init as well as causing an unnecessary "device" to occur in the jit trace. Pull Request resolved: https://github.com/pytorch/pytorch/pull/110163 Approved by: https://github.com/henryhu6, https://github.com/albanD
set_default_dtype