Skip to content

Commit 89d8b56

Browse files
committed
Clarified the installation instructions in the documentation
1 parent 6e94e01 commit 89d8b56

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

CONTRIBUTING.rst

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ Steps with :bash:`sudo` access (e.g. on a local device):
4545

4646
#. Clone the git repository to the desired location: :bash:`git clone https://github.com/KernelTuner/kernel_tuner.git`, and :bash:`cd` to it.
4747
#. Prepare your system for building Python versions.
48-
* On Ubuntu, run :bash:`sudo apt update && apt upgrade`, and :bash:`sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git`.
48+
* On Ubuntu, run :bash:`sudo apt update && sudo apt upgrade`, and :bash:`sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git`.
4949
#. Install `pyenv <https://github.com/pyenv/pyenv#installation>`__:
5050
* On Linux, run :bash:`curl https://pyenv.run | bash` (remember to add the output to :bash:`.bash_profile` and :bash:`.bashrc` as specified).
5151
* 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`.
54+
* Install the Python versions with: :bash:`pyenv install 3.8 3.9 3.10 3.11`
5455
#. Setup a local virtual environment in the folder: :bash:`pyenv virtualenv kerneltuner` (or whatever environment name you prefer).
5556
#. 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).
5657
#. `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):
100101

101102
Running tests
102103
-------------
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.
112119

113120
The examples can be seen as *integration tests* for the Kernel Tuner.
114121
Note that these will also use the installed package.

0 commit comments

Comments
 (0)