You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* On Linux, run :bash:`curl https://pyenv.run | bash` (remember to add the output to :bash:`.bash_profile` and :bash:`.bashrc` as specified).
51
51
* on macOS, run :bash:`brew update && brew install pyenv`.
52
-
#. Install the required Python versions: :bash:`pyenv install 3.8 3.9 3.10 3.11`. On some systems, additional packages may be needed to build Python versions.
53
-
* For example on Ubuntu: :bash:`sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev liblzma-dev lzma`.
52
+
#. Install the required Python versions:
53
+
* On some systems, additional packages may be needed to build Python versions. For example on Ubuntu: :bash:`sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev liblzma-dev lzma`.
#. Setup a local virtual environment in the folder: :bash:`pyenv virtualenv kerneltuner` (or whatever environment name you prefer).
55
56
#. Set the Python versions so they can be found: :bash:`pyenv local 3.8 3.9 3.10 3.11` (replace :bash:`local` with :bash:`global` when not using the virtualenv).
56
57
#. `Install Poetry <https://python-poetry.org/docs/#installing-with-the-official-installer>`__: :bash:`curl -sSL https://install.python-poetry.org | python3 -`. Make sure to add it to :bash:`PATH` as instructed at the end of the installation.
@@ -100,15 +101,21 @@ Steps without :bash:`sudo` access (e.g. on a cluster):
100
101
101
102
Running tests
102
103
-------------
103
-
To run the tests you can use :bash:`nox` (to run against all supported Python versions in isolated environments) and :bash:`pytest` (to run against the local Python version) in the top-level directory.
104
-
For full coverage, make Nox install and use the additional tests (such as cupy and cuda-python) with :bash:`nox -- additional-tests`.
105
-
It's also possible to invoke PyTest from the 'Testing' tab in Visual Studio Code.
106
-
The isolated environments can take up to 1 gigabyte in size, so users tight on diskspace can run :bash:`nox` with the :bash:`small-disk` option. This removes the other environment caches before each session is ran (note that this will take longer to run).
107
-
108
-
Note that tests that require PyCuda and/or a CUDA capable GPU will be skipped if these
109
-
are not installed/present. The same holds for tests that require PyOpenCL, Cupy, Nvidia CUDA.
110
-
111
-
Contributions you make to the Kernel Tuner should not break any of the tests even if you cannot run them locally.
104
+
To run the tests you can use :bash:`nox` (to run against all supported Python versions in isolated environments) and :bash:`pytest` (to run against the local Python version, see below) in the top-level directory.
105
+
For full coverage, make Nox use the additional tests (such as cupy and cuda-python) with :bash:`nox -- additional-tests`.
106
+
The Nox isolated environments can take up to 1 gigabyte in size, so users tight on diskspace can run :bash:`nox` with the :bash:`small-disk` option. This removes the other environment caches before each session is ran (note that this will take longer to run).
107
+
Please note that the command-line options can be combined, e.g. :bash:`nox -- additional-tests skip-hip small-disk`.
108
+
If you do not have fully compatible hardware or environment, you can use the following options:
109
+
* :bash:`nox -- skip-cuda` to skip tests involving CUDA.
110
+
* :bash:`nox -- skip-hip` to skip tests involving HIP.
111
+
* :bash:`nox -- skip-opencl` to skip tests involving OpenCL.
112
+
* :bash:`nox -- skip-gpu` to skip all tests on the GPU (the same as :bash:`nox -- skip-cuda skip-hip skip-opencl`), especially helpful if you don't have a GPU locally.
113
+
Contributions you make to the Kernel Tuner should not break any of the tests even if you cannot run them locally!
114
+
115
+
Running with :bash:`pytest` will test against your local Python version and PIP packages.
116
+
In this case, tests that require PyCuda and/or a CUDA capable GPU will be skipped automatically if these are not installed/present.
117
+
The same holds for tests that require PyOpenCL, Cupy, and CUDA.
118
+
It is also possible to invoke PyTest from the 'Testing' tab in Visual Studio Code to visualize the testing in your IDE.
112
119
113
120
The examples can be seen as *integration tests* for the Kernel Tuner.
114
121
Note that these will also use the installed package.
0 commit comments