Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added src/mintpy/gpu/__init__.py
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# GPU-accelerated network inversion #
############################################################
# Recommend import:
# from mintpy import ifgram_inversion_gpu as ifginv_gpu
# from mintpy.gpu import ifgram_inversion as gpu_ifginv


"""GPU-batched solver for the SBAS network inversion.
Expand Down
2 changes: 1 addition & 1 deletion src/mintpy/ifgram_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def run_ifgram_inversion_patch(ifgram_file, box=None, ref_phase=None, obs_ds_nam
# for the full-rank case. Rank-deficient pixels (rare on real SBAS networks)
# are not handled here; if encountered, NaN/Inf will propagate downstream.
if solver != 'cpu':
from mintpy.ifgram_inversion_gpu import estimate_timeseries_batch
from mintpy.gpu.ifgram_inversion import estimate_timeseries_batch
print(f'estimating time-series via {solver} solver (batched, GPU)')
ts_sub, q_sub, n_sub = estimate_timeseries_batch(
A=A, B=B,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Numerical-equivalence tests for src/mintpy/ifgram_inversion_gpu.py.
"""Numerical-equivalence tests for src/mintpy/gpu/ifgram_inversion.py.

Compare the GPU-batched solver against the per-pixel CPU reference
(scipy.linalg.lstsq via mintpy.ifgram_inversion.estimate_timeseries) on
Expand All @@ -11,12 +11,12 @@

torch = pytest.importorskip("torch")

from mintpy.gpu.ifgram_inversion import estimate_timeseries_batch
from mintpy.ifgram_inversion import estimate_timeseries
from mintpy.ifgram_inversion_gpu import estimate_timeseries_batch

requires_cuda = pytest.mark.skipif(
not torch.cuda.is_available(),
reason="CUDA-capable GPU required for ifgram_inversion_gpu tests",
reason="CUDA-capable GPU required for mintpy.gpu.ifgram_inversion tests",
)


Expand Down