Skip to content

[MISC] Constraint solver func init optimization#2521

Draft
erizmr wants to merge 5 commits intoGenesis-Embodied-AI:mainfrom
erizmr:mingrui/260309/solver_opt_func_init
Draft

[MISC] Constraint solver func init optimization#2521
erizmr wants to merge 5 commits intoGenesis-Embodied-AI:mainfrom
erizmr:mingrui/260309/solver_opt_func_init

Conversation

@erizmr
Copy link
Contributor

@erizmr erizmr commented Mar 9, 2026

Description

Related Issue

Resolves Genesis-Embodied-AI/Genesis#

Motivation and Context

How Has This Been / Can This Be Tested?

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.

@erizmr erizmr marked this pull request as draft March 9, 2026 21:22
@erizmr erizmr marked this pull request as ready for review March 10, 2026 00:17
erizmr and others added 3 commits March 11, 2026 16:46
Convert func_solve_init from a plain @qd.kernel to a @qd.perf_dispatch,
and register func_solve_init_decomposed for CUDA backend. This breaks
the monolithic init into 8 separate kernel launches:
1. _kernel_init_warmstart (warmstart selection, ndrange dofs)
2. _kernel_init_Ma (Ma = M @ qacc, ndrange dofs)
3. _kernel_init_Jaref (Jaref = -aref + J @ qacc, ndrange constraints)
4. _kernel_init_improved (set improved flags)
5. _kernel_init_update_constraint (wraps monolith for FP match)
6. Newton hessian (conditional, reuses existing kernel)
7. _kernel_init_update_gradient (wraps monolith tiled gradient)
8. _kernel_init_search (search = -Mgrad, ndrange dofs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erizmr erizmr force-pushed the mingrui/260309/solver_opt_func_init branch from 961f9c3 to 8ae30ab Compare March 11, 2026 16:47
duburcqa
duburcqa previously approved these changes Mar 12, 2026
@hughperkins
Copy link
Collaborator

this is missing benchmark comparison right?

@duburcqa duburcqa self-requested a review March 13, 2026 12:56
@duburcqa duburcqa dismissed their stale review March 13, 2026 12:58

Waiting for more information about the performance benchmark.

@github-actions
Copy link

🔴 Benchmark Regression Detected ➡️ Report

@hughperkins hughperkins marked this pull request as draft March 19, 2026 17:45
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.

3 participants