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

when I use Multi-GPUs to train my model,RuntimeError: Caught RuntimeError in replica 0 on device 0 #3

Closed
zyegao opened this issue Dec 22, 2021 · 1 comment
Assignees

Comments

@zyegao
Copy link

zyegao commented Dec 22, 2021

When I test the DP mode ,the error happened
image

Refer to the https://di-engine-docs.readthedocs.io/zh_CN/latest/best_practice/multi_gpu_example.html, I changed the file:
(1)gobigger_no_spatial_config.py
image
(2)gobigger_vsbot_baseline_simple_main.py
image

@jayyoung0802
Copy link
Collaborator

Regarding this issue, we have summarized the following points
1、[3, 3, 16] is [evaluator_num, players_per_team, 4*4(dirction * action)]
2、In policy, we merge the first two dimensions, so it becomes [9,16].
3、When using DP,it will divide 9 into 4 and 5, and it will becomes [4,16] and [5,16].
4、[4,16] and [5,16] can't transform [batch, 3, 16], So it reported an error.
5、The solution is to only use DP on Encode,not on all gobigger model.

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