feat(geocode): downgrade gpu_enabled to CPU when isce3 has no CUDA#145
Merged
scottstanie merged 1 commit intoMay 20, 2026
Merged
Conversation
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>
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.
Problem
COMPASS routes
gpu_enabledthroughisce3.core.gpu_check.use_gpu(True, ...), which raises a hard error whenisce3.cudais not importable rather than falling back to CPU. Sogpu_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 samehasattr(isce3, "cuda")probeuse_gpudoes internally, sogpu_enabled=Truemeans "use GPU if available" — downgrades to CPU with a warning when CUDA is absent.gpu_enabled: true(or false) in existing runconfigs can't crash a mismatched environment.core.pyfield docstring updated to describe the new behavior.Test
mypy/ruff/blackclean.🤖 Generated with Claude Code