[ROCm] if TEST_WITH_ROCM, only instantiate GPU device tests (#55069)
Summary:
Improves ROCm CI throughput by instantiating only for device tests that exercise the AMD GPU devices.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55069
Reviewed By: mrshenli
Differential Revision: D27610877
Pulled By: malfet
fbshipit-source-id: aa2b42b9f7611dca37cbb922790d7fe0f4be8dbd