Skip to content

fix(geometry): retry point-in-polygon with finer batching on GPU OOM#62

Open
EliHei2 wants to merge 1 commit into
mainfrom
bugfix/spatial-join-oom
Open

fix(geometry): retry point-in-polygon with finer batching on GPU OOM#62
EliHei2 wants to merge 1 commit into
mainfrom
bugfix/spatial-join-oom

Conversation

@EliHei2
Copy link
Copy Markdown
Collaborator

@EliHei2 EliHei2 commented Jun 1, 2026

The batched quadtree point-in-polygon join could OOM on very large inputs (notably MERSCOPE, with millions of transcripts) and crash the run. Wrap the batch loop so a CUDA out-of-memory error retries with progressively finer batching (doubling the batch count up to 256) before giving up, and return an empty match frame when there are no results instead of failing in cudf.concat.

What to review: the OOM-detection (errors only; non-OOM re-raised immediately) and the bounded retry in _points_in_polygons_contains. Keeps main's quadtree API; no change to the happy path.

The batched quadtree point-in-polygon join could OOM on very large inputs
(notably MERSCOPE, with millions of transcripts) and crash the run. Wrap the
batch loop so a CUDA out-of-memory error retries with progressively finer
batching (doubling the batch count up to 256) before giving up, and return an
empty match frame when there are no results instead of failing in cudf.concat.

What to review: the OOM-detection (errors only; non-OOM re-raised immediately)
and the bounded retry in _points_in_polygons_contains. Keeps main's quadtree
API; no change to the happy path.
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.

2 participants