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

[Question] Training DQN in Atari Env occupy multiple threads #283

Closed
PaladinEE15 opened this issue Jan 6, 2021 · 2 comments
Closed

[Question] Training DQN in Atari Env occupy multiple threads #283

PaladinEE15 opened this issue Jan 6, 2021 · 2 comments
Labels
question Further information is requested

Comments

@PaladinEE15
Copy link

Training DQN in atari env will occupy 9-10 threads, is it a normal phenomenon?
(Platform: Nvidia Titan XP + Xeon E5-2630 v4)

@PaladinEE15 PaladinEE15 added the question Further information is requested label Jan 6, 2021
@araffin
Copy link
Member

araffin commented Jan 6, 2021

Hello,
this is normal, PyTorch is using threads to parallelize matrix computation.
You can change that using:

  • th.set_num_threads() see doc (and optionally th.set_num_interop_threads())
  • export OMP_NUM_THREADS=1 (to set OpenMP threads to 1)

@PaladinEE15
Copy link
Author

Hello,
this is normal, PyTorch is using threads to parallelize matrix computation.
You can change that using:

  • th.set_num_threads() see doc (and optionally th.set_num_interop_threads())
  • export OMP_NUM_THREADS=1 (to set OpenMP threads to 1)

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants