Describe the bug
_reproject_dask_cupy at line 1002 allocates cp.full(out_shape, ...) for the entire output raster on GPU. For a 100k x 100k float64 output this needs 80GB of VRAM.
The dask+numpy path correctly uses map_blocks with per-chunk allocation. The dask+cupy path processes chunks in a sequential Python loop and writes into this single GPU array.
Expected behavior
Add a memory guard that checks GPU free memory before the allocation. The docstring at line 909 already notes this path "processes output chunks in a sequential Python for-loop" — the guard should explain that restructuring to per-chunk GPU allocation would fix this.
Describe the bug
_reproject_dask_cupyat line 1002 allocatescp.full(out_shape, ...)for the entire output raster on GPU. For a 100k x 100k float64 output this needs 80GB of VRAM.The dask+numpy path correctly uses
map_blockswith per-chunk allocation. The dask+cupy path processes chunks in a sequential Python loop and writes into this single GPU array.Expected behavior
Add a memory guard that checks GPU free memory before the allocation. The docstring at line 909 already notes this path "processes output chunks in a sequential Python for-loop" — the guard should explain that restructuring to per-chunk GPU allocation would fix this.