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

distributed train never hit if #8

Open
mambo06 opened this issue Jul 18, 2023 · 2 comments
Open

distributed train never hit if #8

mambo06 opened this issue Jul 18, 2023 · 2 comments

Comments

@mambo06
Copy link

mambo06 commented Jul 18, 2023

so i run train_dist.py and add print(param) under if section
`

  if type(param) is torch.Tensor:

        print(param)

        dist.all_reduce(param.grad.data, op=dist.reduce_op.SUM, group=0)

`
param never printed which means all_reduce never called.

@TomsyPaul
Copy link

I even commented out
# average_gradients(model)
line in run() and there is no difference in output!!

@TomsyPaul
Copy link

TomsyPaul commented Dec 19, 2024

This line can be commented out, I think.
# if type(param) is torch.Tensor:

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

2 participants