Skip to content

Optimization: Tiles version of efc_contact kernels#1087

Draft
Kenny-Vilella wants to merge 15 commits intogoogle-deepmind:mainfrom
Kenny-Vilella:dev/kvilella/experimental_contact_efc
Draft

Optimization: Tiles version of efc_contact kernels#1087
Kenny-Vilella wants to merge 15 commits intogoogle-deepmind:mainfrom
Kenny-Vilella:dev/kvilella/experimental_contact_efc

Conversation

@Kenny-Vilella
Copy link
Collaborator

@Kenny-Vilella Kenny-Vilella commented Jan 29, 2026

List of change:

  • Unified efc_contact_elliptic and efc_contact_pyramidal into a single pipeline of 3 kernels.
  • Init kernel to setup the contact <-> constraint interop
  • Jac kernel to calculate the Jacobian, the heavy work
  • Update kernel to update the efc row
  • Removed the while loop in the jac calculation and instead precalculate this

In total one more kernel and 1 more model property and 2 more data properties.

Will add perf number and some more description later on.

@Kenny-Vilella
Copy link
Collaborator Author

Some perf number from my RTX 4080, median of 5 runs:

Environment Step time (main) Step time (this PR) Δ %
aloha_cloth 2296.62 2179.47 -5.0
aloha_pot 0.60 0.60 ~
aloha_sdf 4.21 4.21 ~
apptronik_apollo_flat 0.47 0.47 ~
apptronik_apollo_hfield 0.82 0.82 ~
apptronik_apollo_terrain 1.81 1.83 1.0
cloth 516.82 539.72 -2.0
franka_emika_panda 0.07 0.07 ~
humanoid 0.38 0.36 -4.3
three_humanoids 3.40 3.32 -2.3

@Kenny-Vilella
Copy link
Collaborator Author

@thowell I saw that you have recently changed the make_constraint function to prepare for sparse Jacobian.

This PR tries to optimize the two efc_contact kernels, basically decreases by 50% the time of the efc_contact kernels.

I wonder what are the critical functionalities that I should maintain for the sparse Jacobian?
Or should I just put this on pause until the change for the sparse Jacobian are all in?

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.

1 participant