Skip to content

reproject() dask+cupy backend: nearest/bilinear resampling lack parity tests #3050

@brendancol

Description

@brendancol

Coverage gap

reproject()'s dask+cupy backend is only parity-checked with resampling='cubic'. The test TestCupyPyprojFallbackParity::test_projected_to_projected_dask_cupy_match in xrspatial/tests/test_reproject.py reprojects an EPSG:32633 -> EPSG:3857 raster on a dask-of-cupy array and compares against the numpy reference, but only for cubic.

nearest and bilinear are covered on numpy (end-to-end) and on eager cupy (the parametrized test_projected_to_projected_numpy_cupy_match runs all three), but never on the dask+cupy chunk-assembly path. So if the dask+cupy path threaded the resampling mode through to _resample_cupy_native incorrectly per chunk, the two non-cubic modes would slip through.

Proposed fix

Parametrize test_projected_to_projected_dask_cupy_match over ['nearest', 'bilinear', 'cubic']. Each mode asserts the dask+cupy result matches the numpy reference: same finite/nodata pattern, finite values within rtol/atol 1e-6.

Test-only. I ran all three modes on a CUDA host and they already pass, so this closes a coverage gap rather than fixing a bug.

Backends affected

dask+cupy (test coverage). numpy, eager cupy, and dask+numpy already have per-mode coverage.

Filed by the test-coverage deep-sweep on the reproject module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gpuCuPy / CUDA GPU supporttestsTest coverage and parity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions