make codegen'd device guards not cuda-specific. Allow them to be used in external codegen (#68531)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68531
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D32498570
Pulled By: bdhirsh
fbshipit-source-id: 0ce6a5614417671313b4d274ea84742c5b81d1b0