Add dask+cupy test coverage for focal.hotspots()#2757
Merged
Conversation
The _hotspots_dask_cupy dispatch path was registered but had no test, unlike mean/apply/focal_stats which each have a dask+cupy test. Adds test_hotspots_dask_cupy comparing the dask+cupy result against the numpy reference on the chunk interior. Verified on a CUDA host: passes and routes through _hotspots_dask_cupy. Closes #2732
…age-focal-2026-05-29 # Conflicts: # xrspatial/tests/test_focal.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a dask+cupy test for
focal.hotspots().Since this PR was first opened, #2739 merged a
test_hotspots_dask_cupythat compares the dask+cupy result against the cupy reference and checks the output stays a cupy-backed dask array. This addstest_hotspots_dask_cupy_matches_numpy, which compares the dask+cupy result against the numpy reference on the chunk interior (same approach astest_apply_dask_cupyandtest_focal_stats_dask_cupy) — so the GPU dask path gets checked against the CPU result, not just against cupy. Passes on a CUDA host and routes through_hotspots_dask_cupy. Test-only, no source changes.Closes #2732. Replaces #2738: that PR's head detached when its branch was deleted and recreated, and GitHub wouldn't re-point it, so this is the same branch under a fresh PR.