Skip to content

[Newton] Clarify contact-capacity preparation across solver initialization #8478

Open

Description

@maxkra15

Follow-up to #8107's contact-preparation discussion.

Solver initialization has two different contact-capacity dependencies:

  • Standalone VBD with rigid-contact history needs collision-pipeline capacity before solver construction: persistent history is allocated at construction and must exist before CUDA graph capture.
  • MJWarp/internal-contact paths discover their required capacity from the constructed solver. Matching and sorting buffers must grow coherently with that capacity.

#8107 handles VBD with a bounded early call to the existing contact initializer, reused later. Moving every solver to contacts-first initialization would not preserve the second dependency.

Can we clarify the contact-capacity/preparation contract so each solver declares its dependency without duplicate allocation or rebuilding resources referenced by a captured graph?

Relevant owners are NewtonVBDManager._build_solver, NewtonManager._initialize_contacts, and NewtonMJWarpManager._initialize_contacts. Coupled solvers retain ownership of their entry-local pipelines and reset lifecycle.

This design follow-up is distinct from Newton #4532, which concerns coupled history correspondence, and #7783, which concerns a specific sorting-capacity mismatch addressed in #8107.

A useful resolution should document capacity ownership/order, preserve disabled/default paths and solver-owned capacity discovery, keep repeated initialization idempotent, and prepare history/matching storage before capture. No universal contacts-first order or new abstraction is prescribed upfront.

Activity

  1. added
    enhancement
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions