Skip to content

Factor constraint kbi computation into a reusable _contact_kbimp function - #1534

Draft
etaoxing wants to merge 1 commit into
google-deepmind:mainfrom
etaoxing:contact_kbimp
Draft

Factor constraint kbi computation into a reusable _contact_kbimp function#1534
etaoxing wants to merge 1 commit into
google-deepmind:mainfrom
etaoxing:contact_kbimp

Conversation

@etaoxing

Copy link
Copy Markdown
Contributor

Extracts the (k, b, impedance) computation out of _efc_row into a standalone _contact_kbimp warp func so it can be reused, and swaps the wp.where selections for real branches to avoid the NaN parameter adjoints warp produced by differentiating the unselected operand.

function
- Pull the (k, b, impedance) computation out of _efc_row into a
  standalone _contact_kbimp warp func so it can be reused
- Replace the wp.where selections with real branches, since warp
  differentiates both operands and the unselected branch produced NaN
  parameter adjoints even when the forward result was finite
@etaoxing
etaoxing marked this pull request as draft July 19, 2026 20:02
@etaoxing

Copy link
Copy Markdown
Contributor Author

for #1535

@thowell

thowell commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

@etaoxing lets run the humanoid benchmark before and after the proposed changes to confirm that there are no performance regressions. thanks!

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.

2 participants