Add GPU option for time series estimation#3
Merged
mohseniaref merged 4 commits intomainfrom Jun 10, 2025
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds optional GPU acceleration to the time-series estimation workflow and provides a benchmarking utility.
- Introduce a
use_gpuflag inestimate_timeseriesandcalc_inv_qualityto switch between NumPy and CuPy backends - Adapt core linear algebra and array operations to use
xp(NumPy or CuPy) - Add
benchmark_gpu_speedupto compare CPU vs. GPU performance
Comments suppressed due to low confidence (3)
src/mintpy/ifgram_inversion.py:146
- [nitpick] The variable name
linmodis not very descriptive. Consider renaming it to something likexp_linalgorbackend_linalgfor clarity.
linmod = linalg
src/mintpy/ifgram_inversion.py:93
- There are no tests covering the
use_gpu=Truepath. It would be helpful to add unit tests that run withuse_gpu=Trueto validate GPU behavior and prevent regressions.
print_msg=True, use_gpu=False):
src/mintpy/ifgram_inversion.py:418
- The
timemodule isn't imported in this file, so calls totime.perf_counter()will raise aNameError. Please addimport timeat the top.
t0 = time.perf_counter()
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.
Summary
ifgram_inversion.pyuse_gpuparameter toestimate_timeseriesandcalc_inv_qualityTesting
pytest -qpython -m compileall -q src/mintpyhttps://chatgpt.com/codex/tasks/task_e_6848ab8ab8748320baac958522fa6f13