pytorch
d7f6bfe6 - Fix require_backends_available to reenable distributed tests (#101704)

Commit
1 year ago
Fix require_backends_available to reenable distributed tests (#101704) ## TLDR Fix decorator to re-enable 26+ distributed tests that were previously being skipped in CI ## Explanation As part of the UCC upstream, we updated the backend tests cases to also include "ucc". https://github.com/pytorch/pytorch/blob/3ed1569e8692bf4aab42da947eae91acc656feb5/torch/testing/_internal/common_distributed.py#L90-L92 In distributed tests we use a decorator which reads from this config and makes sure all backends are available on the system. https://github.com/pytorch/pytorch/blob/3ed1569e8692bf4aab42da947eae91acc656feb5/torch/testing/_internal/distributed/distributed_test.py#L7131 **However**, UCC is not configured on by default for a certain subset of CI tests, which causes the entire test to be skipped (even if the test is meant for nccl and the backend being tested is nccl). As the fix, we should just check that only the `BACKEND` being tested is available ## Changes - Change logic to only check if the current backend being used is available - Rename `require_backends_available` -> `require_backend_is_available` Pull Request resolved: https://github.com/pytorch/pytorch/pull/101704 Approved by: https://github.com/rohan-varma
Author
Committer
Parents
Loading