Skip to content

Add GPU memory guard to reproject dask+cupy path#1131

Merged
brendancol merged 4 commits into
masterfrom
issue-1130
Mar 31, 2026
Merged

Add GPU memory guard to reproject dask+cupy path#1131
brendancol merged 4 commits into
masterfrom
issue-1130

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • Add GPU memory guard before cp.full(out_shape, ...) in _reproject_dask_cupy that checks GPU free memory and raises MemoryError if the output would exceed 80% of free VRAM

Context

Found during performance sweep (#1130). The dask+numpy path correctly uses map_blocks with per-chunk allocation. The dask+cupy path allocates the entire output on GPU in one shot.

Test plan

  • No CuPy tests broken (guard only fires on large outputs exceeding VRAM)

Parallel subagent triage + ralph-loop workflow for auditing all
xrspatial modules for performance bottlenecks, OOM risk under
30TB dask workloads, and backend-specific anti-patterns.
7 tasks covering command scaffold, module scoring, parallel subagent
dispatch, report merging, ralph-loop generation, and smoke tests.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Mar 31, 2026
@brendancol brendancol merged commit 617aac3 into master Mar 31, 2026
11 checks passed
@brendancol brendancol deleted the issue-1130 branch May 4, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant