-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(2048): environment performance improvements #172
feat(2048): environment performance improvements #172
Conversation
Hi @aar65537, thanks a lot for your suggestions for speed improvement! We will look into them, check that the environment's behavior has not changed, and get back to you shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the code and speed improvements! I have left a few comments for which I don't feel very strongly about.
If that's okay, I will resolve the comments by applying suggestions and will merge. |
This PR improves the performance of the Game2048 environment. The improvements include
jax.lax.cond
andjax.lax.switch
jax.vmap
overjax.lax.scan
where possibleThe above figure shows the total performance improvement measured as percent increase in steps/sec. For more detailed benchmarking, see here.