[jit] fix str -> Device implicit conversions (#43213)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43213
A reversed isSubtypeOf caused erroreous conversions to be inserted.
Test Plan: Imported from OSS
Reviewed By: eellison
Differential Revision: D23192787
Pulled By: zdevito
fbshipit-source-id: 4a90b19d99a4fc889e55568ced850f08dadbc3fe