Skip to content

GeoTIFF GPU alias test fails on CuPy-installed but unusable-CUDA environments #2515

@brendancol

Description

@brendancol

Summary

test_gpu_alias_accepts_old_values_without_validation_error_1560 (around line 232 of xrspatial/geotiff/tests/gpu/test_kernels_and_kwargs.py) fails on hosts where CuPy imports but the CUDA runtime can't actually run. The test does not accept the RuntimeError that xrspatial/geotiff/_backends/gpu.py:38 raises by design in that case.

Reproducer

On a host with CuPy installed but no usable CUDA driver:

pytest -q xrspatial/geotiff/tests -m 'not slow' -x -vv
1 failed, 323 passed, 74 skipped, 54 deselected

Failure trace:

RuntimeError: read_geotiff_gpu: CUDA runtime is not usable
(cudaErrorInsufficientDriver: CUDA driver version is insufficient ...)

Why this matters

The preflight RuntimeError is the documented behaviour from issue #1903. The bug is in the test, not the preflight. The geotiff suite is supposed to be a release gate, and right now it can't run cleanly on the common developer / CI setup where CuPy is importable but CUDA is not.

Required correction

Either:

  1. Accept the documented CUDA preflight RuntimeError alongside the exceptions the test already tolerates, or
  2. Stop touching CUDA at all in the alias test (preferred). Reuse the existing _install_cupy_stub_1903 helper so the test verifies the alias value passes validation without ever calling into a real CUDA runtime.

Either way the full geotiff suite should pass on CuPy-installed-but-CUDA-unusable hosts.

Out of scope

Don't change the preflight RuntimeError. It's the documented contract for issue #1903.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggpuCuPy / CUDA GPU supportinfrastructureCI, benchmarks, and tooling

    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