Skip to content

Fixes #885: add dask+cupy backends for focal tools#896

Merged
brendancol merged 2 commits intomasterfrom
fix/add-dask-cupy-support
Feb 25, 2026
Merged

Fixes #885: add dask+cupy backends for focal tools#896
brendancol merged 2 commits intomasterfrom
fix/add-dask-cupy-support

Conversation

@brendancol
Copy link
Contributor

Summary

  • Add _mean_dask_cupy, _apply_cupy, _apply_dask_cupy, and _focal_stats_dask_cupy functions that wrap existing CUDA kernels with map_overlap for dask+cupy inputs
  • Wire all new backends into the ArrayTypeFunctionMapping dispatchers, replacing not_implemented_func stubs
  • Replace the NotImplementedError test for mean() with a correctness test; add new tests for apply() (cupy + dask+cupy) and focal_stats() (dask+cupy)
  • Update README feature matrix to reflect new backend support

Test plan

  • pytest xrspatial/tests/test_focal.py -x -v — all 103 tests pass
  • pytest xrspatial/tests/test_focal.py -x -v -k "dask_cupy or dask_gpu" — 3 new dask+cupy tests pass

…tats

Wire existing cupy CUDA kernels through map_overlap for dask+cupy
inputs so GPU-cluster users no longer need to .compute() first,
avoiding OOM on large datasets.
…ct_latlon_coords

All downstream consumers are read-only, so broadcast views suffice.
Avoids materializing two full (H, W) float64 arrays (~16 bytes/pixel).
@brendancol brendancol merged commit 8c2b75a into master Feb 25, 2026
9 of 10 checks passed
@brendancol brendancol deleted the fix/add-dask-cupy-support branch February 26, 2026 14:46
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