Skip to content

Fixed distributed GPU bug in ImageNet example #995

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

Closed

Conversation

Quentin-Anthony
Copy link

The current imagenet example doesn't move images to the GPU in the distributed GPU case, only in the single GPU case:

https://github.com/pytorch/examples/blob/main/imagenet/main.py#L293
https://github.com/pytorch/examples/blob/main/imagenet/main.py#L337

This leads to errors like the following:

RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

I think this can be fixed by relaxing the if statement.

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

Successfully merging this pull request may close these issues.

4 participants