extract elliptic-cone middle-zone force/cost into a helper - #1536
Open
etaoxing wants to merge 1 commit into
Open
extract elliptic-cone middle-zone force/cost into a helper#1536etaoxing wants to merge 1 commit into
etaoxing wants to merge 1 commit into
Conversation
Contributor
Author
|
for #1535 |
Collaborator
|
@etaoxing lets run the humanoid benchmark before and after the changes to confirm that there are no regressions. thanks! |
etaoxing
force-pushed
the
elliptic_middle
branch
from
July 27, 2026 16:51
c596a46 to
a74cf9d
Compare
Contributor
Author
|
@thowell updated above with benchmark timings! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull the middle-zone force and cost math out of _eval_constraint into a reusable
_eval_elliptic_middlehelper. No behavior change; this just makes the elliptic-cone force available as a single source of truth instead of inlined in the constraint eval.Performance was measured on an NVIDIA RTX PRO 5000 Blackwell with 8,192 worlds and 1,000 steps. Values are means over 10 interleaved runs after unmeasured warmups, comparing
origin/main(d28130a) with this PR (a74cf9d). The only model override isopt.cone=elliptic, since both models default to pyramidal cones and would never reach the changed code; the solver stays on its default (Newton) and the Jacobian stays on auto, which resolves to dense for Humanoid (nv=27) and sparse for G1 (nv=35). Contact and constraint limits come from the benchmark definitions inbenchmarks/*/__init__.py. G1 uses the prerecordedshuffle_dance.npztrajectory; Humanoid uses its standard keyframe rollout. Every run converged all 8,192 worlds with unchanged solver iteration distributions.origin/mainA positive difference means this PR is faster. Both are an order of magnitude below run-to-run variation, so this is parity rather than a change in either direction. That is the expected result: the middle-zone arithmetic is unchanged and Warp inlines the extracted
wp.func, so the generated kernel is equivalent. The benchmarks are here to show the refactor costs nothing, not to claim a speedup.