Choose test affinity based on current affinity (#80327)
This avoids test failures in cgroup environments
Fixes https://github.com/pytorch/pytorch/issues/44368
CC @VitalyFedyunin
new PR after #44369 got closed.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80327
Approved by: https://github.com/VitalyFedyunin