google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.25k stars 249 forks source link

Large difference in steps per second with 'spring' vs 'generalized' #314

Closed gijskoning closed 1 year ago

gijskoning commented 1 year ago

Is it expected that Ant with the generalized pipeline runs 40 times slower compared to the Spring pipeline? (Generalized sps: ~2100, spring: ~85000)

I am running the regular Brax v2 training loop with GPU Nvidia T1000 and actually wanted to train on Halfcheetah but found out that Generalized with any contact pairs runs very slowly. And I din't expect this big of a difference

btaba commented 1 year ago

Hi @gijskoning , thanks for the question! We may tune generalized solver params a bit for each env for speed, but it's expected that generalized is the slower backend