Problem
read_geotiff_gpu in xrspatial/geotiff/__init__.py wraps the GPU decode in an outer try/except Exception that turns any GPU error into a silent CPU fallback:
try:
arr_gpu = gpu_decode_tiles_from_file(...)
except Exception:
pass
Output stays correct, but real bugs in the GPU path go undetected. #1508 was a one-line AttributeError that lived in the codebase invisibly because of this handler.
Suggested change
Either:
- Catch only the specific exceptions we expect to recover from (e.g.
MemoryError, cuda.RuntimeError) and log/re-raise the rest.
- Add an environment variable or kwarg (e.g.
gpu='strict') that disables the fallback so users testing GPU paths get loud failures.
- At minimum, log a warning when the fallback fires.
Severity
LOW. Correctness is fine. Detectability of GPU regressions is the issue.
Related
Discovered while fixing #1508.
Problem
read_geotiff_gpuinxrspatial/geotiff/__init__.pywraps the GPU decode in an outertry/except Exceptionthat turns any GPU error into a silent CPU fallback:Output stays correct, but real bugs in the GPU path go undetected. #1508 was a one-line
AttributeErrorthat lived in the codebase invisibly because of this handler.Suggested change
Either:
MemoryError,cuda.RuntimeError) and log/re-raise the rest.gpu='strict') that disables the fallback so users testing GPU paths get loud failures.Severity
LOW. Correctness is fine. Detectability of GPU regressions is the issue.
Related
Discovered while fixing #1508.