geotiff: GPU + dask+GPU coverage for float16 read (#1941)#1947
Conversation
b111299 to
9ecd552
Compare
PR Review: geotiff: GPU + dask+GPU coverage for float16 read (#1941)Blockers (must fix before merge)None. Suggestions (should fix, not blocking)
Nits (optional improvements)
What looks good
Checklist
|
…trib#1941) Issue xarray-contrib#1941 added float16 auto-promotion on read and gated the GPU GDS path off for (bps=16, sf=float). The eager numpy and dask paths are covered by test_float16_read_1941.py; the cupy and dask+cupy paths had no targeted tests. A regression dropping the bps_mismatch fallback at _backends/gpu.py:357 or the float16 gate in _gds_chunk_path_available would silently mis-decode half-precision tiles and ship under existing CI. Adds 13 tests, all passing on a CUDA host: - read_geotiff_gpu on stripped + tiled (deflate, uncompressed) float16 - open_geotiff(gpu=True) dispatcher thread-through - windowed GPU reads on stripped + tiled float16 - open_geotiff(chunks=, gpu=True) and read_geotiff_gpu(chunks=) - _gds_chunk_path_available structural pin for (bps=16, sf=3) -> False plus a sanity check that float32 tiled files still allow GDS - cross-backend pixel-exact parity (numpy vs GPU, numpy vs dask+GPU, dask+numpy vs dask+GPU) - predictor=3 + float16 GPU round trip Mutation against bps_mismatch flipped 5 tests red; mutation against the GDS float16 gate flipped the structural test red.
9ecd552 to
c485361
Compare
PR Review: geotiff: GPU + dask+GPU coverage for float16 read (#1941) (re-review after rebase)Blockers (must fix before merge)
Suggestions (should fix, not blocking)
Nits (optional improvements)
What looks good
CI status
Checklist
|
…le fixture, importorskip ImportError)
|
Addressed the review in e18236c:
Local run: 12 passed, 2 skipped (kvikio-gated) on a CPU+GPU host without kvikio. |
Summary
Closes a Cat 1 HIGH backend-parity gap for issue #1941 (float16 read auto-promotion). The eager and dask paths were covered by
test_float16_read_1941.py; the cupy and dask+cupy paths had no targeted tests.A regression that:
bps_mismatchstripped/odd-bps fallback at_backends/gpu.py:357would route float16 reads through the tiled GPU decoder and mis-decode half-precision samples(bps=16, sample_format=float)early-out in_gds_chunk_path_availablewould send tiled float16 chunked reads down the kvikIO GDS path and mis-stride the bufferwould have shipped silently. The new tests pin both code paths plus cross-backend parity.
13 new tests, all passing on a CUDA host:
read_geotiff_gpuon stripped + tiled (deflate, uncompressed) float16open_geotiff(gpu=True)dispatcher thread-throughopen_geotiff(chunks=, gpu=True)andread_geotiff_gpu(chunks=)_gds_chunk_path_availablereturns False for (bps=16, sf=3); float32 tiled files still passMutation against
bps_mismatchflipped 5 tests red; mutation against the GDS float16 gate flipped the structural test red.This is a deep-sweep test-coverage PR. No source files were modified.
Test plan
pytest xrspatial/geotiff/tests/test_float16_read_gpu_1941.py(13 passed, 1 skipped due to kvikio import)pytest xrspatial/geotiff/tests/test_float16_read_1941.py xrspatial/geotiff/tests/test_float16_read_gpu_1941.pyruns side by side (22 passed, 1 skipped)bps_mismatchfrom the stripped/odd-bps guard -> 5 tests fail_gds_chunk_path_available-> structural test fails