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
Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -62,13 +62,18 @@ Steps without :bash:`sudo` access (e.g. on a cluster):
62
62
63
63
#. Clone the git repository to the desired location: :bash:`git clone https://github.com/KernelTuner/kernel_tuner.git`.
64
64
#. Install Conda with `Mamba <https://mamba.readthedocs.io/en/latest/mamba-installation.html>`__ (for better performance) or `Miniconda <https://docs.conda.io/projects/conda/en/latest/user-guide/install>`__ (for traditional minimal Conda).
65
-
* [Optional] both Mamba and Miniconda can be automatically activated via :bash:`~/.bashrc`. Do not forget to add these (usually mentioned at the end of the installation).
66
-
* Exit the shell and re-enter to make sure Conda is available, :bash:`cd` to the kernel tuner directory.
65
+
* [Optional] if you are under quotas or are otherwise restricted by disk space, you can instruct Conda to use a different directory for saving environments by adding the following to your :bash:`.condarc` file:
66
+
.. code-block:: bash
67
+
68
+
envs_dirs:
69
+
- /path/to/directory
70
+
* [Optional] both Mamba and Miniconda can be automatically activated via :bash:`~/.bashrc`. Do not forget to add these (usually provided at the end of the installation).
71
+
* Exit the shell and re-enter to make sure Conda is available. :bash:`cd` to the kernel tuner directory.
67
72
* [Optional] update Conda if available before continuing: :bash:`conda update -n base -c conda-forge conda`.
68
73
#. Setup a virtual environment: :bash:`conda create --name kerneltuner python=3.11` (or whatever Python version and environment name you prefer).
69
74
#. Activate the virtual environment: :bash:`conda activate kerneltuner`.
70
75
* [Optional] to use the correct environment by default, execute :bash:`conda config --set auto_activate_base false`, and add `conda activate kerneltuner` to your :bash:`.bash_profile` or :bash:`.bashrc`.
71
-
* Make sure that non-Python dependencies are loaded if applicable, such as CUDA, OpenCL or HIP. On most clusters it is possible to load (or unload) modules (e.g. CUDA, OpenCL / ROCM). For more information, see :ref:`Installation <installation>`.
76
+
#. Make sure that non-Python dependencies are loaded if applicable, such as CUDA, OpenCL or HIP. On most clusters it is possible to load (or unload) modules (e.g. CUDA, OpenCL / ROCM). For more information, see :ref:`Installation <installation>`.
72
77
* Do not forget to make sure the paths are set correctly. If you're using CUDA, the desired CUDA version should be in :bash:`$PATH`, :bash:`$LD_LIBARY_PATH` and :bash:`$CPATH`.
73
78
* [Optional] the loading of modules and setting of paths is likely convenient to put in your :bash:`.bash_profile` or :bash:`.bashrc`.
@@ -82,13 +87,15 @@ Steps without :bash:`sudo` access (e.g. on a cluster):
82
87
* If you alternatively set up with Venv: :bash:`echo "venv" > noxenv.txt`.
83
88
* If you set up with Virtualenv, do not create this file, as this is already the default.
84
89
* Be sure to adjust or remove this file when changing backends.
90
+
#. [Optional] Run the tests on Nox as described below.
85
91
86
92
87
93
Running tests
88
94
-------------
89
95
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.
96
+
For full coverage, make Nox install and use the additional tests (such as cupy and cuda-python) with :bash:`nox -- additional-tests`.
90
97
It's also possible to invoke PyTest from the 'Testing' tab in Visual Studio Code.
91
-
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.
98
+
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).
92
99
93
100
Note that tests that require PyCuda and/or a CUDA capable GPU will be skipped if these
94
101
are not installed/present. The same holds for tests that require PyOpenCL, Cupy, Nvidia CUDA.
0 commit comments