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

Multiple-GPU support? #35

Closed
BIGBALLON opened this issue Aug 28, 2019 · 3 comments
Closed

Multiple-GPU support? #35

BIGBALLON opened this issue Aug 28, 2019 · 3 comments

Comments

@BIGBALLON
Copy link

BIGBALLON commented Aug 28, 2019

@liuziwei7 @zhmiao thanks for your amazing work, from the CAUTION

The current code was prepared using single GPU. The use of multi-GPU can cause problems.

and the error is:

File "./models/MetaEmbeddingClassifier.py", line 48, in forward
    memory_feature = torch.matmul(values_memory, keys_memory)
RuntimeError: size mismatch, m1: [16 x 7], m2: [4 x 512] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:268
# for 2 GPUs:
torch.Size([16, 7])
torch.Size([3, 512])
torch.Size([16, 7])
torch.Size([4, 512])

# for 1 GPU:
torch.Size([32, 7])
torch.Size([7, 512])

Is there any idea to support Multiple-GPU?

@zhmiao
Copy link
Owner

zhmiao commented Sep 6, 2019

Hello @BIGBALLON thank you very much for asking. We are very sorry that the current code does not support multi gpu. And the error you reported is the reason. You are very welcome to modify the code and make it working for multi-gpus.

@GuohongLi
Copy link

@BIGBALLON I have modified it to fit multi-gpus. Maybe it will helpful to u.
L133~135 in
https://github.com/GuohongLi/OpenLongTailRecognition-OLTR/blob/master/run_networks.py

@BIGBALLON
Copy link
Author

@GuohongLi thanks for your help !!! 😸

@zhmiao zhmiao closed this as completed Dec 19, 2019
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

3 participants