openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.57k stars 8.59k forks source link

High GPU Memory usage by Atari Environment #395

Closed peterzcc closed 7 years ago

peterzcc commented 7 years ago

I have been running the 16 Atari environments in parallel according to the A3C algorithm. However, I found that each gym process takes 111MB of GPU memory, which didn't happen using Arcade Learning Environment. Could anyone suggest how to reduce the usage of GPU memory?

tlbtlbtlb commented 7 years ago

Can you be more specific? How is it using GPU memory? How do you measure it?

Gym itself doesn't make any GPU calls, so it must be some other part of the system.

gdb commented 7 years ago

Are you running with the monitor / video recording / rendering enabled? This can cause a pyglet window to be allocated, which would ask for GPU memory.

On Thursday, October 27, 2016, Trevor Blackwell notifications@github.com wrote:

Can you be more specific? How is it using GPU memory? How do you measure it?

Gym itself doesn't make any GPU calls, so it must be some other part of the system.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openai/gym/issues/395#issuecomment-256713699, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM7kdnjdEG1iIX5bNOOuZIzs1xp4yKhks5q4N7xgaJpZM4KiTfZ .

Sent from mobile

peterzcc commented 7 years ago

Thanks a lot for your comments. OK I found that the GPU memory was not occupied by Gym, but the call of OpenCV3: cv2.resize(.) instead, I will investigate it then. Sorry for posting a wrong issue.