Skip to content

Further peformance improvements for source deblending - #2413

Merged
larrybradley merged 5 commits into
astropy:mainfrom
larrybradley:segm/deblend-batched-contrast
Sep 3, 2026
Merged

Further peformance improvements for source deblending#2413
larrybradley merged 5 commits into
astropy:mainfrom
larrybradley:segm/deblend-batched-contrast

Conversation

@larrybradley

Copy link
Copy Markdown
Member

This PR batches every per-source stage of deblending (source statistics, marker construction, the watershed contrast loop, and the label write-out) over chunks of sources in compiled, GIL-releasing kernels that share one packed cutout buffer, producing results identical to before. Fields of many small sources deblend about 1.7x faster serially (roughly 50x faster than 3.0) and now scale with n_threads (2.3x at 8 threads instead of a slowdown), while large-source performance is unchanged.

@larrybradley larrybradley added this to the 3.1.0 milestone Sep 3, 2026
@larrybradley
larrybradley merged commit e2d60bd into astropy:main Sep 3, 2026
31 of 33 checks passed
@larrybradley
larrybradley deleted the segm/deblend-batched-contrast branch September 3, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant