Open imoneoi opened 2 years ago
Hi @imoneoi ,
Thanks for sharing the benchmarks. In random_policy.py
, the actions are actually sampled on CPU individually for each environment, which may be contributing to the slow performance. When we tested training for the Humanoid environment with rlgames_train.py
compared with training in IsaacGymEnvs, we actually observed higher fps in OmniIsaacGymEnvs.
As @kellyguo11 mentioned, if you replace line 62 with:
actions = torch.rand((cfg.task.env.numEnvs, env.action_space.shape[0]), device=task.rl_device)
you should get a TPS (according to your definition in the above example) of more like ~500k.
gotta be careful with sampling on cpu :call_me_hand:
Why is OmniIsaacGymEnvs (Omniverse Isaac Sim) version about 6x slower, compared with IsaacGymEnvs (IsaacGym Preview) version, with same hardware?
Tested on Humanoid environment, headless, with 8192 environments (RTX 3080 Laptop)
IsaacGymEnvs TPS: ~260k OmniIsaacGymEnvs TPS: ~40k
It is also observed that OmniIsaacGymEnvs have only 5% GPU utilization, while IsaacGymEnvs reaches 70% GPU utilization
Test code for OmniIsaacGymEnvs
(random_policy.py modified, added a TPS counter like below)
Test code for IsaacGymEnvs