Toni-SM / skrl

Modular reinforcement learning library (on PyTorch and JAX) with support for NVIDIA Isaac Gym, Omniverse Isaac Gym and Isaac Lab
https://skrl.readthedocs.io/
MIT License
443 stars 43 forks source link

Mixed double precision for PPO algorithm #155

Open lopatovsky opened 3 weeks ago

lopatovsky commented 3 weeks ago

Mixed precision

Motivation:

Inspired by RLGames, we implemented automatic mixed double precision to boost performance of PPO.

Sources:

https://pytorch.org/docs/stable/amp.html

https://pytorch.org/docs/stable/notes/amp_examples.html

Speed eval:

Library Mixed-Precision Time (s) slowing factor Base: rlgames, mixed pr. = True
RLGames No 448 1.322x
RLGames Yes 339 1 (base)
SKRL No 475 1.401x
SKRL Yes 373 1.1x
SKRL Yes * 358 1.056x

* in this run mixed precision was used also for inference during data collection phase

Quality eval: