Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
64de479
Merge pull request #630 from PyLops/master
mrava87 Dec 11, 2024
f8cc8e9
when `sampling` is not given, it's calculated based on `spataxis` and…
AmirMardan Dec 13, 2024
86c38db
instead of recalculation, we use the precalculated sampling values
AmirMardan Dec 13, 2024
dfc2c7a
fix the sampling issue for 3D
AmirMardan Dec 17, 2024
bbc5bd2
Merge pull request #631 from AmirMardan/bug-fix_sampling_when_not_given
mrava87 Dec 17, 2024
12c8c04
minor: switch np.dot to np.matmul in code snipped in installation
mrava87 Jan 2, 2025
6c92032
Merge pull request #633 from mrava87/fix-docmultithread
mrava87 Jan 2, 2025
e8ad8a7
doc: fix typo in wavedecomposition docstrings
mrava87 Jan 15, 2025
6bcedc6
Merge pull request #635 from mrava87/doc-wavedec
mrava87 Jan 15, 2025
6d34db0
minor: added all classes to __all__ in cls_sparsity
mrava87 Jan 23, 2025
b35bbaf
Merge pull request #636 from mrava87/fix-addsparsity
mrava87 Jan 23, 2025
51f1b7f
DOC:
IruNikZe Jan 31, 2025
81b6ff9
Merge pull request #638 from IruNikZe/dev
mrava87 Feb 2, 2025
7d77f43
doc: fixed problem statement for omp in example
mrava87 Feb 5, 2025
2d12a61
Merge pull request #641 from mrava87/doc-ompexample
mrava87 Feb 5, 2025
4fc8979
minor: improved documentation of PhaseShift
mrava87 Feb 6, 2025
055694e
Merge pull request #643 from mrava87/doc-phaseshift
mrava87 Feb 6, 2025
6af0771
bug: missing cols in callback of omp solver
mrava87 Feb 12, 2025
8502e12
Merge pull request #644 from mrava87/bug-omp
mrava87 Feb 12, 2025
5d3e42c
minor: fix broken links in plot_blending
mrava87 Feb 19, 2025
2a7cce9
Merge pull request #645 from mrava87/doc-blendingex
mrava87 Feb 19, 2025
7e97798
minor: one more fix of broken links plot_blending
mrava87 Feb 19, 2025
042ea41
Merge pull request #646 from mrava87/fix-blendingex
mrava87 Feb 19, 2025
6234478
feat: added kwargs_fft to all fft operators
mrava87 Feb 23, 2025
f9a7813
Merge pull request #647 from mrava87/feat-fftkwargs
mrava87 Feb 24, 2025
cf1b22b
Removes the creation of the solver from within the shots iteration loop.
Feb 27, 2025
f866365
Fix flake8
Feb 27, 2025
2751eea
ci: relax numpy requirements for dev env
mrava87 Mar 3, 2025
c59745b
ci: remove python3.9 from GA
mrava87 Mar 3, 2025
cd77a15
ci: move to python3.11 in azure-pipelines
mrava87 Mar 3, 2025
242875b
Merge pull request #651 from mrava87/ci-numpy2
mrava87 Mar 3, 2025
7488bb5
ci: switched to py311 in codacy-coverage GA
mrava87 Mar 5, 2025
3beb8fc
Merge pull request #652 from mrava87/ci-coveragep311
mrava87 Mar 5, 2025
bed03f7
Change to get source position directly from solver instead of self.ge…
Mar 6, 2025
48b26cf
Merge pull request #650 from guaacoelho/cache_enhancement
mrava87 Mar 6, 2025
b13122c
doc: fixed mistake in docstring of ps method
mrava87 Mar 12, 2025
9be6be3
Merge pull request #653 from mrava87/doc-avo
mrava87 Mar 12, 2025
81d1548
minor: small change to ToCupy docstring
mrava87 Mar 12, 2025
02d151e
Merge pull request #654 from mrava87/minor-tocupydo
mrava87 Mar 12, 2025
254beae
feat: added optimal_coeff to omp
mrava87 Mar 16, 2025
30a9390
Merge pull request #655 from mrava87/feat-mpbasis
mrava87 Mar 16, 2025
934f935
bug: avoid passing directly explicit to _ColumnLinearOperator
mrava87 Mar 18, 2025
21b3930
Merge pull request #656 from mrava87/bug-columnop
mrava87 Mar 18, 2025
30fb3eb
bug: fix pad in convolve1d to work with cupy
mrava87 Apr 10, 2025
be75cc5
Merge pull request #657 from mrava87/bug-conv1d
mrava87 Apr 10, 2025
5fea172
bug: fix num_threads_per_blocks from size of 2 to 3
mrava87 Apr 11, 2025
a6d2c60
Merge pull request #658 from mrava87/bug-fourrad3d
mrava87 Apr 11, 2025
7a1b4c6
bug: fix mdd to run with cupy when twosided=True and add_negative=True
mrava87 Apr 26, 2025
d62f4f4
Merge pull request #659 from mrava87/fix-mddcupy
mrava87 Apr 26, 2025
b1b2cba
ci: modified test suite to run on cupy
mrava87 Apr 27, 2025
fa2773c
minor: removed unused requirements file
mrava87 Apr 30, 2025
676c84c
minor: fix jax import in test_jaxoperator
mrava87 Apr 30, 2025
ce89a2d
bug: added safeguards to get_module_name
mrava87 May 2, 2025
992c2cb
Merge pull request #661 from mrava87/bug-get_module_name
mrava87 May 2, 2025
fa9f2aa
minor: improved docstring of ≈≈inplace_set
mrava87 May 3, 2025
44bae08
Merge pull request #662 from mrava87/fix-inplace_set_doc
mrava87 May 3, 2025
4f3bb29
test: reduce strenght of initial guess in irls tests
mrava87 May 9, 2025
f94d550
Merge pull request #660 from mrava87/test-cupy2
mrava87 May 27, 2025
d2c5c00
fixes #664
cako Jun 7, 2025
2eaf978
test: make pytensoroperator tests run on macOS
mrava87 Jun 9, 2025
2f73718
feat: add cuda backend to Kirchhoff
mrava87 Jun 11, 2025
b944dcb
minor: fix error message
mrava87 Jun 11, 2025
af21b95
CI: Python 3.10 in CI (until scikit-fmm is fixed)
mrava87 Jun 15, 2025
63c639c
Merge pull request #667 from PyLops/fix-missing-pymc
mrava87 Jun 15, 2025
a859393
Merge pull request #668 from mrava87/test-pytensor
mrava87 Jun 15, 2025
40624af
build: added make rules for tests on gpu and more on documentation
mrava87 Jun 16, 2025
a61dd4e
Merge pull request #671 from mrava87/doc-cupytest
mrava87 Jun 16, 2025
527b539
CI: Cupy Testing GA (#672)
hongyx11 Jun 18, 2025
b7cdbab
test: added cuda tests for Kirchhoff
mrava87 Jun 18, 2025
b666567
test: fix test_kirchhoff for cuda engine
mrava87 Jun 18, 2025
768f9c5
doc: minor updates to docstring removing mention of dynamic not imple…
mrava87 Jun 19, 2025
777e538
Merge pull request #669 from mrava87/feat-kirchhoffcuda
mrava87 Jun 19, 2025
f8a8531
release: prepare for v2.5.0
mrava87 Jun 21, 2025
80d9209
Merge pull request #673 from mrava87/release-v2.5.0
mrava87 Jun 21, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyLops
name: PyLops Testing

on: [push, pull_request]

Expand All @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
platform: [ ubuntu-latest, macos-13 ]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", ] # "3.11" temporarely removed due to issues with scikit-fmm

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -30,6 +30,6 @@ jobs:
run: |
python -m setuptools_scm
pip install .
- name: Test with pytest
- name: Tests with pytest
run: |
pytest
35 changes: 35 additions & 0 deletions .github/workflows/buildcupy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PyLops Testing (CuPy)

on: [push, pull_request]

jobs:
build:
runs-on: self-hosted
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Print checked code and check environments
run: |
ls -lah
echo $(pwd)
echo $(which python3)
echo $(which pip3)
- name: Set up Python environment and Install dependencies
run: |
python3 -m venv pylopsvenv
source pylopsvenv/bin/activate
echo $(which python3)
echo $(which pip3)
python3 -m pip install --upgrade pip setuptools
pip install flake8 pytest setuptools-scm
pip install -r requirements-dev-gpu.txt
- name: Install pylops
run: |
source pylopsvenv/bin/activate
python3 -m setuptools_scm
pip install .
- name: Tests with pytest
run: |
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1;
source pylopsvenv/bin/activate
pytest
2 changes: 1 addition & 1 deletion .github/workflows/codacy-coverage-reporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
platform: [ ubuntu-latest, ]
python-version: ["3.9", ]
python-version: ["3.10", ]

runs-on: ${{ matrix.platform }}
steps:
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
Changelog
=========

# 2.5.0
* Added `cuda` engine to `pylops.waveeqprocessing.Kirchhoff`
operator
* Added `Opbasis` and `optimal_coeff` to
`pylops.optimization.cls_sparsity.OMP`
* Added `solver` to the input parameters of the `_oneshot`
internal methods of `pylops.waveeqprocessing.AcousticWave2D`
to avoid recreating it for every shot
* Added `kwargs_fft` to `pylops.signalprocessing.FFT`,
`pylops.signalprocessing.FFT2D`, and
`pylops.signalprocessing.FFTND`
* Fix bug in `pylops.waveeqprocessing.MDD` when using
CuPy arrays for `G` and `d` with `twosided=True` and `add_negative=True`
* Fix bug in `pylops.signalprocessing.FourierRadon3D`
in the default choice of `num_threads_per_blocks`
* Fix bug in `pylops.signalprocessing.Convolve1D`
in the definition of `pad` and `padd` when applying the
operator to a CuPy array
* Fix bug in `pylops.optimization.cls_sparsity.OMP` avoiding
passing `explicit` in the creation of `_ColumnLinearOperator`
* Fix bug in `pylops.optimization.cls_sparsity.OMP` callback
method as `cols` was not passed not allowing ``x`` to be
properly reconstructed
* Fix bug in `pylops.waveeqprocessing.SeismicInterpolation`
in calculation of `sampling` when not passed

# 2.4.0
* Added `pylops.signalprocessing.FourierRadon2d` and
`pylops.signalprocessing.FourierRadon3d` operators
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ that the both old and new tests pass successfully:
make tests
```

If you have access to a GPU, it is advised also that old and new tests run with the CuPy
backend pass successfully:
```
make tests_gpu
```

4. Run flake8 to check the quality of your code:
```
make lint
Expand Down
21 changes: 20 additions & 1 deletion Makefile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PIP := $(shell command -v pip3 2> /dev/null || command which pip 2> /dev/null)
PYTHON := $(shell command -v python3 2> /dev/null || command which python 2> /dev/null)

.PHONY: install dev-install install_conda dev-install_conda tests doc docupdate servedoc lint typeannot coverage
.PHONY: install dev-install dev-install_gpu install_conda dev-install_conda dev-install_conda_arm tests tests_cpu_ongpu tests_gpu doc docupdate servedoc lint typeannot coverage

pipcheck:
ifndef PIP
Expand All @@ -24,6 +24,11 @@ dev-install:
$(PIP) install -r requirements-dev.txt &&\
$(PIP) install -r requirements-torch.txt && $(PIP) install -e .

dev-install_gpu:
make pipcheck
$(PIP) install -r requirements-dev-gpu.txt &&\
$(PIP) install -e .

install_conda:
conda env create -f environment.yml && conda activate pylops && pip install .

Expand All @@ -33,10 +38,24 @@ dev-install_conda:
dev-install_conda_arm:
conda env create -f environment-dev-arm.yml && conda activate pylops && pip install -e .

dev-install_conda_gpu:
conda env create -f environment-dev-gpu.yml && conda activate pylops_gpu && pip install -e .

tests:
# Run tests with CPU
make pythoncheck
pytest

tests_cpu_ongpu:
# Run tests with CPU on a system with GPU (and CuPy installed)
make pythoncheck
export CUPY_PYLOPS=0 && export TEST_CUPY_PYLOPS=0 && pytest

tests_gpu:
# Run tests with GPU (requires CuPy to be installed)
make pythoncheck
export TEST_CUPY_PYLOPS=1 && pytest

doc:
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\
rm -rf source/tutorials && rm -rf build && make html && cd ..
Expand Down
11 changes: 6 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@ jobs:
# displayName: 'Windows'
#
# pool:
# vmImage: 'windows-2019'
# vmImage: 'windows-2025'
#
# variables:
# NUMBA_NUM_THREADS: 1
#
# steps:
# - task: UsePythonVersion@0
# inputs:
# versionSpec: '3.9'
# versionSpec: '3.10'
# architecture: 'x64'
#
# - script: |
# python -m pip install --upgrade pip setuptools wheel django
# pip install -r requirements-dev.txt
# pip install -r requirements-torch.txt
# pip install .
# displayName: 'Install prerequisites and library'
#
# - script: |
# python setup.py test
# pytest
# condition: succeededOrFailed()
# displayName: 'Run tests'

Expand All @@ -55,7 +56,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
architecture: 'x64'

- script: |
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
architecture: 'x64'

- script: |
Expand Down
35 changes: 33 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,37 @@
Changelog
=========

Version 2.5.0
-------------

*Released on: 21/06/2025*

* Added `cuda` engine to :py:class:`pylops.waveeqprocessing.Kirchhoff`
operator
* Added `Opbasis` and `optimal_coeff` to
:py:class:`pylops.optimization.cls_sparsity.OMP`
* Added `solver` to the input parameters of the `_oneshot`
internal methods of :py:class:`pylops.waveeqprocessing.AcousticWave2D`
to avoid recreating it for every shot
* Added `kwargs_fft` to `pylops.signalprocessing.FFT`,
:py:class:`pylops.signalprocessing.FFT2D`, and
:py:class:`pylops.signalprocessing.FFTND`
* Fix bug in :py:func:`pylops.waveeqprocessing.MDD` when using
CuPy arrays for `G` and `d` with `twosided=True` and `add_negative=True`
* Fix bug in :py:class:`pylops.signalprocessing.FourierRadon3D`
in the default choice of `num_threads_per_blocks`
* Fix bug in :py:class:`pylops.signalprocessing.Convolve1D`
in the definition of `pad` and `padd` when applying the
operator to a CuPy array
* Fix bug in :py:class:`pylops.optimization.cls_sparsity.OMP` avoiding
passing `explicit` in the creation of `_ColumnLinearOperator`
* Fix bug in :py:class:`pylops.optimization.cls_sparsity.OMP` callback
method as `cols` was not passed not allowing ``x`` to be
properly reconstructed
* Fix bug in :py:func:`pylops.waveeqprocessing.SeismicInterpolation`
in calculation of `sampling` when not passed


Version 2.4.0
-------------

Expand Down Expand Up @@ -189,7 +220,7 @@ Version 1.18.0
* Extended :py:func:`pylops.Laplacian` to N-dimensional arrays
* Added `forward` kind to :py:class:`pylops.SecondDerivative` and
:py:func:`pylops.Laplacian`
* Added `chirp-sliding` kind to :py:class:`pylops.waveeqprocessing.seismicinterpolation.SeismicInterpolation`
* Added `chirp-sliding` kind to :py:func:`pylops.waveeqprocessing.SeismicInterpolation`
* Fixed bug due to the new internal structure of `LinearOperator` submodule introduced in `scipy1.8.0`


Expand Down Expand Up @@ -389,7 +420,7 @@ Version 1.9.1
:py:class:`pylops.signalprocessing.FFT2D` to ensure that the type of the input
vector is retained when applying forward and adjoint.
* Added ``dtype`` parameter to the ``FFT`` calls in the definition of the
:py:class:`pylops.waveeqprocessing.MDD` operation. This ensure that the type
:py:func:`pylops.waveeqprocessing.MDD` operation. This ensure that the type
of the real part of ``G`` input is enforced to the output vectors of the
forward and adjoint operations.

Expand Down
7 changes: 7 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ that the both old and new tests pass successfully:

>> make tests

If you have access to a GPU, it is advised also that old and new tests run with the CuPy
backend pass successfully:

.. code-block:: bash

>> make tests_gpu

4. Run flake8 to check the quality of your code:

.. code-block:: bash
Expand Down
14 changes: 14 additions & 0 deletions docs/source/gpu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ be also wrapped into a :class:`pylops.JaxOperator`.
See below for a comphrensive list of supported operators and additional functionalities for both the
``cupy`` and ``jax`` backends.

Install dependencies
--------------------
GPU-enabled development environments can created using ``conda``

.. code-block:: bash

>> make dev-install_conda_gpu

or ``pip``

.. code-block:: bash

>> make dev-install_gpu


Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ and run the following code in Python:
B = np.random.random((size, size))
print("Time with %s threads: %f s" \
%(os.environ.get("OMP_NUM_THREADS"),
timeit(lambda: np.dot(A, B), number=4)))
timeit(lambda: np.matmul(A, B), number=4)))

Subsequently set the environment variables to ``2`` or any higher number of threads available
in your hardware (multi-threaded), and run the same code.
Expand Down
Loading