`collect_env`: parse HIP version exception free (#101844)
Should prevent broken collect_env reporting as shown in https://github.com/pytorch/vision/issues/7561#issue-1698000841
<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 5204e0f</samp>
> _`get_version_or_na`_
> _Helper function refactors_
> _Code like autumn leaves_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101844
Approved by: https://github.com/kit1980, https://github.com/ZainRizvi