apex
apex copied to clipboard
[rfc][transformer][test] Make test flexible
Currently apex.transformer test assumes NCCL backend as you can see in:
- https://github.com/NVIDIA/apex/blob/2b7d280ba53898f0b332b7ee02068e4f737d13c9/apex/transformer/testing/distributed_test_base.py#L11
- https://github.com/NVIDIA/apex/blob/2b7d280ba53898f0b332b7ee02068e4f737d13c9/apex/transformer/testing/distributed_test_base.py#L40-L51
By renaming BACKEND_NCCL
to e.g. DIST_BACKEND
and replacing DistributedTestBase.BACKEND_NCCL
with self.DIST_BACKEND
, the test can be run with backends other than nccl.
cc @eqy @ptrblck