geotiff: GPU + dask+GPU coverage for predictor=3 + integer reject (#1933)#1951
Open
brendancol wants to merge 2 commits into
Open
Conversation
86fa8f3 to
4711485
Compare
Contributor
Author
PR Review: geotiff: GPU + dask+GPU coverage for predictor=3 + integer reject (#1933)Blockers (must fix before merge)
Suggestions (should fix, not blocking)
Nits (optional improvements)
What looks good
Checklist
|
brendancol
added a commit
to brendancol/xarray-spatial
that referenced
this pull request
May 15, 2026
… writer for round-trip)
brendancol
added a commit
to brendancol/xarray-spatial
that referenced
this pull request
May 15, 2026
… writer for round-trip)
2c26804 to
1e34c92
Compare
Contributor
Author
PR Review: geotiff: GPU + dask+GPU coverage for predictor=3 + integer reject (#1933) (re-review after rebase)Rebased cleanly onto Blockers
Suggestions
Nits
What looks good
Checklist
|
…rray-contrib#1933) xarray-contrib#1933 added _validate_predictor_sample_format and wired it into every IFD-read site, including two GPU sites that had no targeted tests: - _backends/gpu.py:443 -- tiled eager GPU validator - _backends/gpu.py:999 -- GDS chunked GPU validator The eager and dask paths are covered by test_predictor3_int_dtype_1933. A regression dropping either GPU validator call would let malformed predictor=3 + integer tiled files decode silently to garbage bytes on GPU and ship under existing CI. Adds 9 tests, all passing on a CUDA host: - read_geotiff_gpu on stripped + tiled malformed files - open_geotiff(gpu=True) and open_geotiff(chunks=, gpu=True) dispatchers - read_geotiff_gpu(chunks=) on stripped + tiled - legitimate predictor=3 + float32 tiled file still round-trips on GPU (eager + dask+GPU) - error-message parity between GPU and eager paths Mutation against the tiled GPU validator at gpu.py:443 flipped the tiled-raises test red; mutation against the GDS chunked validator at gpu.py:999 flipped the chunked-tiled + chunked-dispatcher tests red.
… writer for round-trip)
Contributor
Author
|
Rebased onto current main at |
1e34c92 to
4dec5b6
Compare
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
Closes a Cat 1 HIGH backend-parity gap for issue #1933 (
_validate_predictor_sample_format). The eager numpy and dask paths are covered bytest_predictor3_int_dtype_1933.py; the cupy and dask+cupy paths had no targeted tests.The validator is invoked at two GPU sites:
_backends/gpu.py:443-- tiled eager GPU read_backends/gpu.py:999-- GDS chunked GPU readA regression dropping either call would let malformed
predictor=3 + integer SampleFormattiled files decode silently to garbage bytes on GPU.9 new tests, all passing on a CUDA host:
read_geotiff_gpuon stripped + tiled malformed filesopen_geotiff(gpu=True)andopen_geotiff(chunks=, gpu=True)dispatchersread_geotiff_gpu(chunks=)on stripped + tiledpredictor=3 + float32tiled file still round-trips on GPU (eager + dask+GPU)Mutation against the tiled GPU validator at
gpu.py:443flipped the tiled-raises test red. Mutation against the GDS chunked validator atgpu.py:999flipped the chunked-tiled + chunked-dispatcher tests red.This is a deep-sweep test-coverage PR. No source files were modified.
Test plan
pytest xrspatial/geotiff/tests/test_predictor3_int_dtype_gpu_1933.py(9 passed)pytest xrspatial/geotiff/tests/test_predictor3_int_dtype_1933.py xrspatial/geotiff/tests/test_predictor3_int_dtype_gpu_1933.py(19 passed)_validate_predictor_sample_formatat gpu.py:443 ->test_gpu_eager_tiled_raisesfails_validate_predictor_sample_formatat gpu.py:999 ->test_read_geotiff_gpu_chunked_tiled_raises+test_open_geotiff_chunks_gpu_dispatcher_raisesfail