geotiff: golden corpus phase 3 PR 3, GPU backend (#1930)#2039
Merged
Conversation
Mirrors phase 3 PR 1 (#2036) and PR 2 (#2038) but reads each fixture through ``open_geotiff(str(path), gpu=True, on_gpu_failure='strict')``, returning a CuPy-backed DataArray. The oracle's ``_candidate_pixels`` pulls the device array back to host via ``.get()`` before comparing. The whole module ``pytest.importorskip``s cupy and skips if no CUDA device is reachable, so CI matrices without a GPU collect zero tests here. The strict on-gpu-failure mode is on so a silent CPU fallback surfaces as an exception rather than masking GPU coverage. 23 fixtures pass, 7 xfailed (shared codec/attrs gaps), 2 skipped (MinIsWhite + the example_ manifest entry). ``_GPU_SKIPS`` is reserved for GPU-specific gaps and is empty for now. A ``test_gpu_candidate_is_actually_on_device`` belt-and-braces check confirms the result is a ``cupy.ndarray`` rather than a CPU-fallback numpy array.
This was referenced May 18, 2026
Address phase 3 PR 3 review: ``compression_jpeg_uint8_ycbcr`` lived in ``_PARITY_GAPS`` with the reason "RGB band axis order divergence", which describes the failure mode on the eager and dask backends. On the GPU path with ``on_gpu_failure='strict'`` the JPEG-YCbCr decoder raises ``OSError: broken data stream`` before the oracle gets to compare anything, so the recorded reason no longer matches what actually happens. Move the entry to ``_GPU_SKIPS`` with a GPU-accurate reason. The xfail mechanics are unchanged; this is documentation that now matches reality. Update the module docstring to match.
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.
Summary
Phase 3 PR 3 of the golden corpus plan in #1930. Mirrors phase 3 PRs 1 and 2 but reads each fixture through
open_geotiff(str(path), gpu=True, on_gpu_failure='strict'), returning a CuPy-backed DataArray. The oracle's_candidate_pixelspulls the device array back to host via.get()before comparing.The whole module
pytest.importorskips cupy and skips if no CUDA device is reachable, so CI matrices without a GPU collect zero tests here. The strict on-gpu-failure mode is on so a silent CPU fallback surfaces as an exception rather than masking GPU coverage.23 fixtures pass at level-0 parity. 7 xfailed with strict=True (the same shared codec/attrs gaps the eager and dask backends flag). 2 skipped: MinIsWhite (intentional inversion per #1797) and the
example_*manifest entry without an on-disk .tif._GPU_SKIPSis reserved for GPU-specific gaps and is empty in the first pass. Atest_gpu_candidate_is_actually_on_devicebelt-and-braces check confirms the result is acupy.ndarrayrather than a CPU-fallback numpy array.Test plan
pytest xrspatial/geotiff/tests/test_golden_corpus_gpu_1930.py: 23 passed, 7 xfailed, 2 skippedRefs #1930. Third of six backend-wiring PRs; dask+GPU, HTTP/COG, and VRT remain.