Skip to content

[FEATURE] Add performance mode#1330

Merged
hughperkins merged 8 commits intoGenesis-Embodied-AI:mainfrom
hughperkins:hp/add-performance-mode
Jun 30, 2025
Merged

[FEATURE] Add performance mode#1330
hughperkins merged 8 commits intoGenesis-Embodied-AI:mainfrom
hughperkins:hp/add-performance-mode

Conversation

@hughperkins
Copy link
Collaborator

@hughperkins hughperkins commented Jun 28, 2025

Description

  • Compilation consistently takes around 30s on Linux (Coreweave NVIDIA H100)
    • This translates in x1.4 speedup for MPR, x2 speedup for MPR+SDF, and x6 speedup for GJK
  • Runtime speed is within ~1%-5% slower

Related Issue

Resolves #1329

Motivation and Context

As a simulation user,
I want to be able to compile Genesis quickly
Because I don't want to wait for it to compile.

How Has This Been / Can This Be Tested?

Run franka arm with/without the option, after deleting the cache each time. In more detail:

rm -Rf ~/.cache/taichi/; time python ndarray_perf/single_franka_envs.py --horizon 100

Result, on 5090:

iteration time 668.4088706970215 us
[Genesis] [18:54:24] [INFO] 💤 Exiting Genesis and caching compiled kernels...

real    0m26.231s
user    0m37.009s
sys     0m1.595s

compare with:

rm -Rf ~/.cache/taichi/; time python ndarray_perf/single_franka_envs.py --horizon 100 --performance-mode 1

Result, on 5090:

iteration time 661.4446640014648 us
[Genesis] [18:58:11] [INFO] 💤 Exiting Genesis and caching compiled kernels...

real    2m8.540s
user    2m19.173s
sys     0m1.731s

Screenshots (if appropriate):

Checklist:

  • I read the CONTRIBUTING document.
  • I followed the Submitting Code Changes section of CONTRIBUTING document.
  • I tagged the title correctly (including BUG FIX/FEATURE/MISC/BREAKING)
  • I updated the documentation accordingly or no change is needed.
  • I tested my changes and added instructions on how to test it for reviewers.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@hughperkins hughperkins marked this pull request as draft June 28, 2025 01:58
@duburcqa
Copy link
Collaborator

duburcqa commented Jun 28, 2025

Make sure that the benchmarks are still using performance mode, and add one benchmark in the parameter matrix that check the performance for non-performance mode.

@hughperkins hughperkins marked this pull request as ready for review June 30, 2025 20:55
@hughperkins
Copy link
Collaborator Author

Make sure that the benchmarks are still using performance mode, and add one benchmark in the parameter matrix that check the performance for non-performance mode.

Per out-of-band discussions, we will benchmark only with performance mode off, and then you will look at creating a new bencharmk CI, that runs once a ~week, that will run with a more diverse set of parameter combinations.

@duburcqa duburcqa enabled auto-merge (squash) June 30, 2025 21:23
@hughperkins hughperkins disabled auto-merge June 30, 2025 21:52
@hughperkins hughperkins merged commit 95c5a3e into Genesis-Embodied-AI:main Jun 30, 2025
13 checks passed
@hughperkins hughperkins deleted the hp/add-performance-mode branch June 30, 2025 22:34
Milotrince pushed a commit to Milotrince/Genesis that referenced this pull request Jul 5, 2025
* add perofrmance mode

* change how performance mode is applied

* move back into args

* add info about perofrmance mode

* update comment

---------

Co-authored-by: Alexis DUBURCQ <alexis.duburcq@gmail.com>
Co-authored-by: YilingQiao <49262224+YilingQiao@users.noreply.github.com>
chris-la-humalab pushed a commit to HumaLab/Genesis that referenced this pull request Aug 1, 2025
* add perofrmance mode

* change how performance mode is applied

* move back into args

* add info about perofrmance mode

* update comment

---------

Co-authored-by: Alexis DUBURCQ <alexis.duburcq@gmail.com>
Co-authored-by: YilingQiao <49262224+YilingQiao@users.noreply.github.com>
YilingQiao added a commit to YilingQiao/Genesis that referenced this pull request Aug 22, 2025
* add perofrmance mode

* change how performance mode is applied

* move back into args

* add info about perofrmance mode

* update comment

---------

Co-authored-by: Alexis DUBURCQ <alexis.duburcq@gmail.com>
Co-authored-by: YilingQiao <49262224+YilingQiao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Make Genesis compile faster

3 participants