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

How to store dataset in shared memory for ddp? #1981

Closed
sabetAI opened this issue May 28, 2020 · 4 comments · Fixed by #2029
Closed

How to store dataset in shared memory for ddp? #1981

sabetAI opened this issue May 28, 2020 · 4 comments · Fixed by #2029
Labels
feature Is an improvement or enhancement help wanted Open to be worked on

Comments

@sabetAI
Copy link

sabetAI commented May 28, 2020

How can I share memory across my processes in ddp? I'm getting OOM errors with 2 gpus and a 6gb dataset. My script would also load faster if it wasn't pickling the dataset and copying to other processes.

@sabetAI sabetAI added feature Is an improvement or enhancement help wanted Open to be worked on labels May 28, 2020
@JiamingSuen
Copy link

@williamFalcon Would you please explain how #2029 resolves this issue?
It would be nice if you can give some instructions on how to store datasets in the shared memory in pytorch-lighting, thanks!

@yjqiang
Copy link

yjqiang commented Nov 2, 2021

@JiamingSuen I have the same idea like yours. So did you make it now? Can you help me about this?

@JiamingSuen
Copy link

JiamingSuen commented Nov 2, 2021

@JiamingSuen I have the same idea like yours. So did you make it now? Can you help me about this?

I end up splitting the large in-memory dataset into different splits and letting each worker loads its own split.
You may take a look at this code for further reference.

@yjqiang
Copy link

yjqiang commented Nov 2, 2021

@JiamingSuen But this is very different from the single-device version in the shuffle process. The shuffle process is more complete in single-device, isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants