-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Labels
backend-coverageAdding missing dask/cupy/dask+cupy backend supportAdding missing dask/cupy/dask+cupy backend supportenhancementNew feature or requestNew feature or requestfocal toolsFocal statistics and hotspot analysisFocal statistics and hotspot analysisgpuCuPy / CUDA GPU supportCuPy / CUDA GPU support
Description
Problem
Both hotspots() and emerging_hotspots() support 3 of 4 backends but are missing dask+cupy:
# focal.py line 1223
dask_cupy_func=lambda *args: not_implemented_func(
*args, messages='hotspots() does not support dask with cupy backed DataArray.'),
# emerging_hotspots.py line 601
dask_cupy_func=lambda *args: not_implemented_func(
messages='emerging_hotspots() does not support dask+cupy backed DataArray.',Why This Should Be Straightforward
- The cupy backends for both already exist (
_hotspots_cupy,_emerging_hotspots_cupy). - The dask+numpy backends also exist and use
map_overlap. - The same file (
focal.py) already has a working dask+cupy implementation formean()at line 80 that demonstrates the pattern. - The missing piece is combining these:
map_overlapwith cupy chunk functions and cupy meta arrays.
Proposed Fix
hotspots: implement_hotspots_dask_cupy()following the_mean_dask_cupy()pattern.emerging_hotspots: implement_emerging_hotspots_dask_cupy()similarly.- Update README feature matrix: add ✅ for Hotspots dask GPU column.
Impact
Hotspot analysis is critical for spatial epidemiology, crime analysis, and environmental monitoring — compute-intensive operations where GPU provides the most benefit.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backend-coverageAdding missing dask/cupy/dask+cupy backend supportAdding missing dask/cupy/dask+cupy backend supportenhancementNew feature or requestNew feature or requestfocal toolsFocal statistics and hotspot analysisFocal statistics and hotspot analysisgpuCuPy / CUDA GPU supportCuPy / CUDA GPU support