Handling the error codes of hipGetDeviceCount (#80405)
Correcting the error code handling for `hipGetDeviceCount()` when no GPU are visible on the device/container.
The hipGetDeviceCount() API is updated NOT to return _`hipErrorInvalidDevice`_ and will be available in later ROCm releases.
cc @jithunnair-amd
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80405
Approved by: https://github.com/malfet, https://github.com/jeffdaily