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

use Multiprocessing instead of Threading? #27

Open
mw66 opened this issue Jan 22, 2017 · 3 comments
Open

use Multiprocessing instead of Threading? #27

mw66 opened this issue Jan 22, 2017 · 3 comments

Comments

@mw66
Copy link

mw66 commented Jan 22, 2017

The current implementation use Python Threading. I just wonder if this can be switched using Multiprocessing?

Multiprocessing performs much better on multi-core CPUs than Threading in Python.

Is this possible? did I miss something?

@ei-grad
Copy link

ei-grad commented Jan 25, 2017

It doesn't matter on single machine since most computations are produced in tensorflow and environment emulator which both don't suffer from GIL. But it could be really nice to investigate the ability to get a distributed async agent learning implementation somehow.

@mw66
Copy link
Author

mw66 commented Feb 20, 2017

Nowadays even a single machine have multiple cores, but python Threading only use 1, for many application (e.g. in my case) I want to use the extra core to speed up data-generating / loading.

@ppwwyyxx
Copy link

@mingwugmail python threading does not just use 1 core.
Although it just very often use fewer cores than similar code written in multiprocessing. In the case of A3C I've tried both and multiprocessing is indeed faster.

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