Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_sync() used when using ddp #133

Open
NothingIknow opened this issue Apr 15, 2024 · 0 comments
Open

no_sync() used when using ddp #133

NothingIknow opened this issue Apr 15, 2024 · 0 comments

Comments

@NothingIknow
Copy link

NothingIknow commented Apr 15, 2024

I found this part quite confusing in train_util.py

if last_batch or not self.use_ddp:
        losses = compute_losses()
    else:
        with self.ddp_model.no_sync():
            losses = compute_losses()

Is this part supposed to be like this? When the model is using ddp, why do we need to stop sync across all gpus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant