Skip to content

Commit

Permalink
Minor updates to dependencies and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fjwillemsen committed Oct 11, 2023
1 parent 42d8bfe commit d22bdc9
Show file tree
Hide file tree
Showing 6 changed files with 703 additions and 286 deletions.
15 changes: 11 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ Steps without :bash:`sudo` access (e.g. on a cluster):

#. Clone the git repository to the desired location: :bash:`git clone https://github.com/KernelTuner/kernel_tuner.git`.
#. 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).
* [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).
* Exit the shell and re-enter to make sure Conda is available, :bash:`cd` to the kernel tuner directory.
* [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:
.. code-block:: bash
envs_dirs:
- /path/to/directory
* [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).
* Exit the shell and re-enter to make sure Conda is available. :bash:`cd` to the kernel tuner directory.
* [Optional] update Conda if available before continuing: :bash:`conda update -n base -c conda-forge conda`.
#. Setup a virtual environment: :bash:`conda create --name kerneltuner python=3.11` (or whatever Python version and environment name you prefer).
#. Activate the virtual environment: :bash:`conda activate kerneltuner`.
* [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`.
* 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>`.
#. 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>`.
* 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`.
* [Optional] the loading of modules and setting of paths is likely convenient to put in your :bash:`.bash_profile` or :bash:`.bashrc`.
#. `Install Poetry <https://python-poetry.org/docs/#installing-with-the-official-installer>`__: :bash:`curl -sSL https://install.python-poetry.org | python3 -`.
Expand All @@ -82,13 +87,15 @@ Steps without :bash:`sudo` access (e.g. on a cluster):
* If you alternatively set up with Venv: :bash:`echo "venv" > noxenv.txt`.
* If you set up with Virtualenv, do not create this file, as this is already the default.
* Be sure to adjust or remove this file when changing backends.
#. [Optional] Run the tests on Nox as described below.


Running tests
-------------
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.
For full coverage, make Nox install and use the additional tests (such as cupy and cuda-python) with :bash:`nox -- additional-tests`.
It's also possible to invoke PyTest from the 'Testing' tab in Visual Studio Code.
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.
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).

Note that tests that require PyCuda and/or a CUDA capable GPU will be skipped if these
are not installed/present. The same holds for tests that require PyOpenCL, Cupy, Nvidia CUDA.
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ COBYLA, SLSQP, Random Search, Basinhopping, Differential Evolution, a Genetic Al
Optimization, the Firefly Algorithm, Simulated Annealing, Dual Annealing, Iterative Local Search,
Multi-start Local Search, and Bayesian Optimization.

.. image:: doc/gemm-amd-summary.png
.. image:: https://github.com/KernelTuner/kernel_tuner/blob/master/doc/gemm-amd-summary.png?raw=true
:width: 100%
:align: center

Expand Down Expand Up @@ -193,8 +193,8 @@ If you use Kernel Tuner in research or research software, please cite the most r
}


.. |Build Status| image:: https://github.com/KernelTuner/kernel_tuner/actions/workflows/python-app.yml/badge.svg
:target: https://github.com/KernelTuner/kernel_tuner/actions/workflows/python-app.yml
.. |Build Status| image:: https://github.com/KernelTuner/kernel_tuner/actions/workflows/build-test-python-package.yml/badge.svg
:target: https://github.com/KernelTuner/kernel_tuner/actions/workflows/build-test-python-package.yml
.. |CodeCov Badge| image:: https://codecov.io/gh/KernelTuner/kernel_tuner/branch/master/graph/badge.svg
:target: https://codecov.io/gh/KernelTuner/kernel_tuner
.. |PyPi Badge| image:: https://img.shields.io/pypi/v/kernel_tuner.svg?colorB=blue
Expand Down
15 changes: 8 additions & 7 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ attrs==23.1.0 ; python_version >= "3.8" and python_version < "3.12"
babel==2.13.0 ; python_version >= "3.8" and python_version < "3.12"
backcall==0.2.0 ; python_version >= "3.8" and python_version < "3.12"
beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "3.12"
bleach==6.0.0 ; python_version >= "3.8" and python_version < "3.12"
bleach==6.1.0 ; python_version >= "3.8" and python_version < "3.12"
certifi==2023.7.22 ; python_version >= "3.8" and python_version < "3.12"
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.12" and implementation_name == "pypy"
charset-normalizer==3.3.0 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -29,20 +29,20 @@ jinja2==3.1.2 ; python_version >= "3.8" and python_version < "3.12"
joblib==1.3.2 ; python_version >= "3.8" and python_version < "3.12"
jsonschema-specifications==2023.7.1 ; python_version >= "3.8" and python_version < "3.12"
jsonschema==4.19.1 ; python_version >= "3.8" and python_version < "3.12"
jupyter-client==8.3.1 ; python_version >= "3.8" and python_version < "3.12"
jupyter-core==5.3.2 ; python_version >= "3.8" and python_version < "3.12"
jupyter-client==8.4.0 ; python_version >= "3.8" and python_version < "3.12"
jupyter-core==5.4.0 ; python_version >= "3.8" and python_version < "3.12"
jupyterlab-pygments==0.2.2 ; python_version >= "3.8" and python_version < "3.12"
markupsafe==2.1.3 ; python_version >= "3.8" and python_version < "3.12"
matplotlib-inline==0.1.6 ; python_version >= "3.8" and python_version < "3.12"
mistune==3.0.2 ; python_version >= "3.8" and python_version < "3.12"
natsort==8.4.0 ; python_version >= "3.8" and python_version < "3.12"
nbclient==0.8.0 ; python_version >= "3.8" and python_version < "3.12"
nbconvert==7.8.0 ; python_version >= "3.8" and python_version < "3.12"
nbconvert==7.9.2 ; python_version >= "3.8" and python_version < "3.12"
nbformat==5.9.2 ; python_version >= "3.8" and python_version < "3.12"
nbsphinx==0.9.3 ; python_version >= "3.8" and python_version < "3.12"
numpy==1.24.4 ; python_version >= "3.8" and python_version < "3.12"
packaging==23.2 ; python_version >= "3.8" and python_version < "3.12"
pandas==1.5.3 ; python_version >= "3.8" and python_version < "3.12"
pandas==2.0.3 ; python_version >= "3.8" and python_version < "3.12"
pandocfilters==1.5.0 ; python_version >= "3.8" and python_version < "3.12"
parso==0.8.3 ; python_version >= "3.8" and python_version < "3.12"
pexpect==4.8.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32"
Expand All @@ -63,7 +63,7 @@ pywin32==306 ; sys_platform == "win32" and platform_python_implementation != "Py
pyzmq==25.1.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.30.2 ; python_version >= "3.8" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12"
rpds-py==0.10.3 ; python_version >= "3.8" and python_version < "3.12"
rpds-py==0.10.4 ; python_version >= "3.8" and python_version < "3.12"
scikit-learn==1.3.1 ; python_version >= "3.8" and python_version < "3.12"
scipy==1.10.1 ; python_version >= "3.8" and python_version < "3.12"
six==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -85,8 +85,9 @@ tinycss2==1.2.1 ; python_version >= "3.8" and python_version < "3.12"
toml==0.10.2 ; python_version >= "3.8" and python_version < "3.12"
tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11"
tornado==6.3.3 ; python_version >= "3.8" and python_version < "3.12"
traitlets==5.11.1 ; python_version >= "3.8" and python_version < "3.12"
traitlets==5.11.2 ; python_version >= "3.8" and python_version < "3.12"
typing-extensions==4.8.0 ; python_version >= "3.8" and python_version < "3.12"
tzdata==2023.3 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.0.6 ; python_version >= "3.8" and python_version < "3.12"
wcwidth==0.2.8 ; python_version >= "3.8" and python_version < "3.12"
webencodings==0.5.1 ; python_version >= "3.8" and python_version < "3.12"
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def tests(session: Session) -> None:
except Exception as error:
print(error)
session.warn(install_warning)
if install_opencl and (session.python == "3.7" or session.python == "3.8"):
if install_opencl and session.python == "3.8":
# if we need to install the OpenCL extras, first install pyopencl seperately.
# it has `oldest-supported-numpy` as a build dependency which doesn't work with Poetry, but only for Python<3.9
try:
Expand Down
Loading

0 comments on commit d22bdc9

Please sign in to comment.