Skip to content

Conversation

Leguark
Copy link
Member

@Leguark Leguark commented Sep 24, 2025

Refactor Dual Contouring with Parallel Processing Support

This PR refactors the dual contouring implementation to support parallel processing for multiple surfaces. The changes include:

  • Added parallel processing capability using torch.multiprocessing or standard multiprocessing
  • Split triangulation logic into separate modules for better organization:
    • _parallel_triangulation.py for multi-process surface processing
    • _sequential_triangulation.py for single-process processing
  • Implemented worker initialization to prevent thread oversubscription
  • Added logic to automatically determine when parallel processing is beneficial
  • Fixed gradient data handling to ensure compatible dtypes between tensors
  • Improved error handling and fallback to sequential processing when needed

Currently, parallel processing is disabled by default as benchmarks don't show significant speedup yet, but the infrastructure is in place for future optimization.

@Leguark Leguark changed the title multiprocess [ENH] Refactor dual contouring with parallel and sequential triangulation modules Sep 24, 2025
@Leguark Leguark marked this pull request as ready for review September 24, 2025 11:59
@Leguark Leguark force-pushed the opt_tri_II branch 2 times, most recently from 16468ec to 405b77a Compare September 24, 2025 13:09
@Leguark Leguark force-pushed the dual_contour_opt branch 2 times, most recently from 1beeed2 to 7208c26 Compare September 25, 2025 08:36
Copy link
Member Author

Leguark commented Sep 25, 2025

Merge activity

  • Sep 25, 8:42 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 25, 8:47 AM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 25, 8:48 AM UTC: @Leguark merged this pull request with Graphite.

@Leguark Leguark changed the base branch from dual_contour_opt to graphite-base/26 September 25, 2025 08:43
@Leguark Leguark changed the base branch from graphite-base/26 to main September 25, 2025 08:45
@Leguark Leguark merged commit ebceb19 into main Sep 25, 2025
2 checks passed
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.

1 participant