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

DDP performance varies from gpu number #56

Open
yuanze1024 opened this issue Dec 27, 2023 · 1 comment
Open

DDP performance varies from gpu number #56

yuanze1024 opened this issue Dec 27, 2023 · 1 comment

Comments

@yuanze1024
Copy link

I have found that when using 4 Gpus', the results are inferior to 2 Gpus'.

After checking the codes, I found that the code reduce losses and then divide by the world_size. That is kinda weird to me. I think the loss.backward will do it implicitly. So I remove this.

#def all_reduce_average(tensor):
#    val = all_reduce_sum(tensor)
#    return val / get_world_size()

def all_reduce_average(tensor):
    return tensor

I'm still running the experiments, and after getting the result, I'll record it here.

@yxchng
Copy link

yxchng commented Mar 17, 2024

@yuanze1024 are your experiments done? does removing this improve performance?

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