File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed
Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ that the both old and new tests pass successfully:
6363 make tests
6464 ```
6565
66+ If you have access to a GPU, it is advised also that old and new tests run with the CuPy
67+ backend pass successfully:
68+ ```
69+ make tests_gpu
70+ ```
71+
66724. Run flake8 to check the quality of your code:
6773 ```
6874 make lint
Original file line number Diff line number Diff line change 11PIP := $(shell command -v pip3 2> /dev/null || command which pip 2> /dev/null)
22PYTHON := $(shell command -v python3 2> /dev/null || command which python 2> /dev/null)
33
4- .PHONY : install dev-install dev-install_gpu install_conda dev-install_conda dev-install_conda_arm tests doc docupdate servedoc lint typeannot coverage
4+ .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
55
66pipcheck :
77ifndef PIP
@@ -42,9 +42,20 @@ dev-install_conda_gpu:
4242 conda env create -f environment-dev-gpu.yml && conda activate pylops_gpu && pip install -e .
4343
4444tests :
45+ # Run tests with CPU
4546 make pythoncheck
4647 pytest
4748
49+ tests_cpu_ongpu :
50+ # Run tests with CPU on a system with GPU (and CuPy installed)
51+ make pythoncheck
52+ export CUPY_PYLOPS=0 && export TEST_CUPY_PYLOPS=0 && pytest
53+
54+ tests_gpu :
55+ # Run tests with GPU (requires CuPy to be installed)
56+ make pythoncheck
57+ export TEST_CUPY_PYLOPS=1 && pytest
58+
4859doc :
4960 cd docs && rm -rf source/api/generated && rm -rf source/gallery && \
5061 rm -rf source/tutorials && rm -rf build && make html && cd ..
Original file line number Diff line number Diff line change @@ -75,6 +75,13 @@ that the both old and new tests pass successfully:
7575
7676 >> make tests
7777
78+ If you have access to a GPU, it is advised also that old and new tests run with the CuPy
79+ backend pass successfully:
80+
81+ .. code-block :: bash
82+
83+ >> make tests_gpu
84+
7885 4. Run flake8 to check the quality of your code:
7986
8087.. code-block :: bash
Original file line number Diff line number Diff line change @@ -32,6 +32,20 @@ be also wrapped into a :class:`pylops.JaxOperator`.
3232See below for a comphrensive list of supported operators and additional functionalities for both the
3333``cupy `` and ``jax `` backends.
3434
35+ Install dependencies
36+ --------------------
37+ GPU-enabled development environments can created using ``conda ``
38+
39+ .. code-block :: bash
40+
41+ >> make dev-install_conda_gpu
42+
43+ or ``pip ``
44+
45+ .. code-block :: bash
46+
47+ >> make dev-install_gpu
48+
3549
3650 Examples
3751--------
You can’t perform that action at this time.
0 commit comments