Skip to content

Commit c820015

Browse files
committed
Extended local dev environment instructions and added packaging as a dependency
1 parent 2499668 commit c820015

File tree

4 files changed

+71
-66
lines changed

4 files changed

+71
-66
lines changed

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"editor.formatOnType": true,
1111
"editor.formatOnSave": false,
1212
"editor.codeActionsOnSave": {
13-
"source.fixAll": true,
14-
"source.organizeImports": true,
13+
"source.fixAll": "explicit",
14+
"source.organizeImports": "explicit"
1515
}
1616
},
1717
"black-formatter.args": [

CONTRIBUTING.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,19 @@ Steps with :bash:`sudo` access (e.g. on a local device):
5151
* After installation, restart your shell.
5252
#. Install the required Python versions:
5353
* 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`
55-
#. Setup a local virtual environment in the folder: :bash:`pyenv virtualenv kerneltuner` (or whatever environment name you prefer).
54+
* Install the Python versions with: :bash:`pyenv install 3.8 3.9 3.10 3.11`. The reason we're installing all these versions as opposed to just one, is so we can test against all supported Python versions.
5655
#. 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+
#. Setup a local virtual environment in the folder: :bash:`pyenv virtualenv 3.11 kerneltuner` (or whatever environment name and Python version you prefer).
5757
#. `Install Poetry <https://python-poetry.org/docs/#installing-with-the-official-installer>`__.
5858
* Use :bash:`curl -sSL https://install.python-poetry.org | python3 -` to install Poetry.
5959
* Make sure to add Poetry to :bash:`PATH` as instructed at the end of the installation.
6060
* Add the poetry export plugin with :bash:`poetry self add poetry-plugin-export`.
6161
#. Make sure that non-Python dependencies are installed if applicable, such as CUDA, OpenCL or HIP. This is described in :ref:`Installation <installation>`.
62-
#. Re-open the shell for changes to take effect. Activate the environment with :bash:`pyenv activate kerneltuner`.
62+
#. Apply changes:
63+
* Re-open the shell for changes to take effect.
64+
* Activate the environment with :bash:`pyenv activate kerneltuner`.
65+
* Make sure :bash:`which python` and :bash:`which pip` point to the expected Python location and version.
66+
* Update Pip with :bash:`pip install --upgrade pip`.
6367
#. Install the project, dependencies and extras: :bash:`poetry install --with test,docs -E cuda -E opencl -E hip`, leaving out :bash:`-E cuda`, :bash:`-E opencl` or :bash:`-E hip` if this does not apply on your system. To go all-out, use :bash:`--all-extras`
6468
* Depending on the environment, it may be necessary or convenient to install extra packages such as :bash:`cupy-cuda11x` / :bash:`cupy-cuda12x`, and :bash:`cuda-python`. These are currently not defined as dependencies for kernel-tuner, but can be part of tests.
6569
* 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`.

0 commit comments

Comments
 (0)