Fix `is_compile_supported()` when `device_type` contains device index (#147837)
Summary:
Fixes #147826
X-link: https://github.com/pytorch/pytorch/pull/147837
Approved by: https://github.com/anijain2305
Reviewed By: yangw-dev
Differential Revision: D72080412
fbshipit-source-id: ce80f0c151f1b96d58da03377a68a695037407bb
Author
generatedunixname499836121