Skip to content

feat(geocode): downgrade gpu_enabled to CPU when isce3 has no CUDA#145

Merged
scottstanie merged 1 commit into
isce-framework:mainfrom
scottstanie:feat-gpu-availability-fallback
May 20, 2026
Merged

feat(geocode): downgrade gpu_enabled to CPU when isce3 has no CUDA#145
scottstanie merged 1 commit into
isce-framework:mainfrom
scottstanie:feat-gpu-availability-fallback

Conversation

@scottstanie
Copy link
Copy Markdown
Member

Problem

COMPASS routes gpu_enabled through isce3.core.gpu_check.use_gpu(True, ...), which raises a hard error when isce3.cuda is not importable rather than falling back to CPU. So gpu_enabled=True (the default) aborts the workflow on any CPU-only isce3 build instead of just running on CPU.

Fix

  • _resolve_gpu_enabled(): mirrors the same hasattr(isce3, "cuda") probe use_gpu does internally, so gpu_enabled=True means "use GPU if available" — downgrades to CPU with a warning when CUDA is absent.
  • Re-patch worker settings on resume so a previously-written gpu_enabled: true (or false) in existing runconfigs can't crash a mismatched environment.
  • core.py field docstring updated to describe the new behavior.

Test

mypy/ruff/black clean.

🤖 Generated with Claude Code

COMPASS calls isce3.core.gpu_check.use_gpu(True, ...), which raises a
hard error when isce3.cuda is not importable instead of falling back to
CPU. Add _resolve_gpu_enabled() mirroring the same hasattr(isce3,
'cuda') probe so gpu_enabled=True means 'use GPU if available', and
re-patch runconfigs on resume so a stale gpu_enabled value can't crash a
mismatched environment. Update the core.py docstring to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@scottstanie scottstanie merged commit 8c3514d into isce-framework:main May 20, 2026
4 checks passed
@scottstanie scottstanie deleted the feat-gpu-availability-fallback branch May 20, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant