Enable distributed cpp test for rocm (#106132)
There are some cpp tests that did not run for ROCm platform. This is the part of effort to enable them. Specifically, this change is to enable the distributed cpp tests.
Test plan:
Tested by using rocm/pytorch-nightly:latest image, and verified the distributed cpp tests PASSED locally.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106132
Approved by: https://github.com/huydhn