Skip to content

Parallelize automatic section-mask candidate evaluation and support merging multiple winning candidates#29

Draft
0hmX wants to merge 1 commit intomainfrom
codex/add-parallelized-section-solver
Draft

Parallelize automatic section-mask candidate evaluation and support merging multiple winning candidates#29
0hmX wants to merge 1 commit intomainfrom
codex/add-parallelized-section-solver

Conversation

@0hmX
Copy link
Copy Markdown
Contributor

@0hmX 0hmX commented Apr 9, 2026

Motivation

  • Increase throughput and robustness of the automatic section-mask search by evaluating candidates in parallel and allowing multiple non-overlapping beneficial candidates to be merged into a single section mask.

Description

  • Added CandidateEvaluationResult and isCandidateEvaluationResult, refactored candidate evaluation into a chunked/parallelized evaluation pipeline that aggregates per-candidate timings and results.
  • Batch-evaluates candidates in chunks of PARALLEL_CANDIDATE_SOLVE_LIMIT (default 4) and collects solved, replayed finalMaxRegionCost values for comparison.
  • Chooses multiple non-overlapping candidates by improvement, merges their port masks, replays the merged solution, and updates the best mask; replaced single winningCandidateLabel/family with winningCandidateLabels and winningCandidateFamilies.
  • Added new TinyHyperGraphSectionSolverOptions.PARALLEL_CANDIDATE_SOLVE_LIMIT and DEFAULT_PARALLEL_CANDIDATE_SOLVE_LIMIT, exposed the option in applyTinyHyperGraphSectionSolverOptions and getTinyHyperGraphSectionSolverOptions, and set default properties on section solvers.

Testing

  • Ran project build via yarn build to ensure TypeScript compilation succeeded and the bundle compiles correctly, and it passed.
  • Ran unit test suite via yarn test to validate behavior of the pipeline changes, and tests passed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant