NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.42k stars 1.4k forks source link

Avoid importing apex transformer automatically #1801

Open nWEIdia opened 6 months ago

nWEIdia commented 6 months ago

and make error message more clear when apex.transformer is explicitly called on unsupported platform

In some configurations, pytorch may not be built with distributed support. So we avoid the auto import of transformer, which calls torch.distributed api explicitly.