Comments (3)
Right now, I'd recommend torch.nn.parallel.DistributedDataParallel
for all practical purposes. It's pretty darn good (fast and robust).
from apex.
apex.parallel.DistributedDataParallel
and torch.nn.parallel.DistributedDataParallel
have the same purpose. They are model wrappers that automatically take care of gradient allreduces during the backward pass. Their usage is almost identical. The Apex version offers some features that the torch version does not, but we plan to merge Apex features into upstream eventually, so for forward compatibility, you may as well just use the torch version.
apex.parallel.DistributedDataParallel example
torch.nn.parallel.DistributedDataParallel example (note the slightly different constructor arguments)
FP16_Optimizer happens to be used in these examples, but its presence is unrelated to the DistributedDataParallel wrappers. You can ignore it.
torch.distributed.launch
is a wrapper script intended to spawn multiple processes, and supply them with the arguments and the environment necessary to set up distributed training within each process. torch.distributed.launch
can be used with either apex.parallel.DistributedDataParallel
or torch.nn.parallel.DistributedDataParallel
.
from apex.
I understand that they both have the same purposes, but are there any potential/theoretical advantages to using the apex vs torch, aside from extra options? Performance/speed?
from apex.
Related Issues (20)
- cannot import name 'AutoencoderKLTemporalDecoder' from 'diffusers.models'
- No module named 'torch._six' HOT 1
- install failure
- Unclear licensing for contrib/sparsity
- Up to date patch for Windows compilation with Visual Studio 2022, CUDA 12.1 and PyTorch 2.2.2 HOT 1
- apex not installing
- [ INSTALLATION ] - Not able to install apex on a Linux machine HOT 2
- Not Able to install apex.
- Contrib unit test failure in `openfold_triton/test_fused_adam_swa.py::FusedAdamSWATestCase::test_fused_update_on_random_data`
- ImportError: cannot import name '_library_root_logger' from 'apex' (unknown location) HOT 2
- Cannot import name 'UnencryptedCookieSessionFactoryConfig' HOT 3
- "packaging" library exists but not found HOT 3
- Error
- Win11+Visual Studio 2022,install successfully. HOT 2
- Unable to install Apex HOT 2
- Release GIL when calling C extensions
- unable to install HOT 3
- Unable to install Apex on Linux(debian) with CUDA 12.1 and torch 2.2.2 HOT 2
- Unknown CUDA arch (compute) or GPU not supported error while installing on docker ubuntu with cuda 12.1
- Install set.up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apex.