Skip to content

Commit

Permalink
Add changes for d22bdc9
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 11, 2023
1 parent 3851307 commit d88adec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
29 changes: 22 additions & 7 deletions latest/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,20 @@ <h3>Local setup<a class="headerlink" href="#local-setup" title="Permalink to thi
<section id="cluster-setup">
<h3>Cluster setup<a class="headerlink" href="#cluster-setup" title="Permalink to this heading"></a></h3>
<p>Steps without <code class="code highlight bash docutils literal highlight-bash">sudo</code> access (e.g. on a cluster):</p>
<ol class="arabic simple">
<ol class="arabic">
<li><p>Clone the git repository to the desired location: <code class="code highlight bash docutils literal highlight-bash">git<span class="w"> </span>clone<span class="w"> </span>https://github.com/KernelTuner/kernel_tuner.git</code>.</p></li>
<li><dl class="simple">
<dt>Install Conda with <a class="reference external" href="https://mamba.readthedocs.io/en/latest/mamba-installation.html">Mamba</a> (for better performance) or <a class="reference external" href="https://docs.conda.io/projects/conda/en/latest/user-guide/install">Miniconda</a> (for traditional minimal Conda).</dt><dd><ul class="simple">
<li><p>[Optional] both Mamba and Miniconda can be automatically activated via <code class="code highlight bash docutils literal highlight-bash">~/.bashrc</code>. Do not forget to add these (usually mentioned at the end of the installation).</p></li>
<li><p>Exit the shell and re-enter to make sure Conda is available, <code class="code highlight bash docutils literal highlight-bash"><span class="nb">cd</span></code> to the kernel tuner directory.</p></li>
<li><dl>
<dt>Install Conda with <a class="reference external" href="https://mamba.readthedocs.io/en/latest/mamba-installation.html">Mamba</a> (for better performance) or <a class="reference external" href="https://docs.conda.io/projects/conda/en/latest/user-guide/install">Miniconda</a> (for traditional minimal Conda).</dt><dd><ul>
<li><dl>
<dt>[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 <code class="code highlight bash docutils literal highlight-bash">.condarc</code> file:</dt><dd><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>envs_dirs:
<span class="w"> </span>-<span class="w"> </span>/path/to/directory
</pre></div>
</div>
</dd>
</dl>
</li>
<li><p>[Optional] both Mamba and Miniconda can be automatically activated via <code class="code highlight bash docutils literal highlight-bash">~/.bashrc</code>. Do not forget to add these (usually provided at the end of the installation).</p></li>
<li><p>Exit the shell and re-enter to make sure Conda is available. <code class="code highlight bash docutils literal highlight-bash"><span class="nb">cd</span></code> to the kernel tuner directory.</p></li>
<li><p>[Optional] update Conda if available before continuing: <code class="code highlight bash docutils literal highlight-bash">conda<span class="w"> </span>update<span class="w"> </span>-n<span class="w"> </span>base<span class="w"> </span>-c<span class="w"> </span>conda-forge<span class="w"> </span>conda</code>.</p></li>
</ul>
</dd>
Expand All @@ -188,7 +196,12 @@ <h3>Cluster setup<a class="headerlink" href="#cluster-setup" title="Permalink to
<li><dl class="simple">
<dt>Activate the virtual environment: <code class="code highlight bash docutils literal highlight-bash">conda<span class="w"> </span>activate<span class="w"> </span>kerneltuner</code>.</dt><dd><ul class="simple">
<li><p>[Optional] to use the correct environment by default, execute <code class="code highlight bash docutils literal highlight-bash">conda<span class="w"> </span>config<span class="w"> </span>--set<span class="w"> </span>auto_activate_base<span class="w"> </span><span class="nb">false</span></code>, and add <cite>conda activate kerneltuner</cite> to your <code class="code highlight bash docutils literal highlight-bash">.bash_profile</code> or <code class="code highlight bash docutils literal highlight-bash">.bashrc</code>.</p></li>
<li><p>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 <a class="reference internal" href="install.html#installation"><span class="std std-ref">Installation</span></a>.</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>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 <a class="reference internal" href="install.html#installation"><span class="std std-ref">Installation</span></a>.</dt><dd><ul class="simple">
<li><p>Do not forget to make sure the paths are set correctly. If you’re using CUDA, the desired CUDA version should be in <code class="code highlight bash docutils literal highlight-bash"><span class="nv">$PATH</span></code>, <code class="code highlight bash docutils literal highlight-bash"><span class="nv">$LD_LIBARY_PATH</span></code> and <code class="code highlight bash docutils literal highlight-bash"><span class="nv">$CPATH</span></code>.</p></li>
<li><p>[Optional] the loading of modules and setting of paths is likely convenient to put in your <code class="code highlight bash docutils literal highlight-bash">.bash_profile</code> or <code class="code highlight bash docutils literal highlight-bash">.bashrc</code>.</p></li>
</ul>
Expand Down Expand Up @@ -216,14 +229,16 @@ <h3>Cluster setup<a class="headerlink" href="#cluster-setup" title="Permalink to
</dd>
</dl>
</li>
<li><p>[Optional] Run the tests on Nox as described below.</p></li>
</ol>
</section>
</section>
<section id="running-tests">
<h2>Running tests<a class="headerlink" href="#running-tests" title="Permalink to this heading"></a></h2>
<p>To run the tests you can use <code class="code highlight bash docutils literal highlight-bash">nox</code> (to run against all supported Python versions in isolated environments) and <code class="code highlight bash docutils literal highlight-bash">pytest</code> (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 <code class="code highlight bash docutils literal highlight-bash">nox<span class="w"> </span>--<span class="w"> </span>additional-tests</code>.
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 <code class="code highlight bash docutils literal highlight-bash">nox</code> with the <code class="code highlight bash docutils literal highlight-bash">small-disk</code> option. This removes the other environment caches before each session is ran.</p>
The isolated environments can take up to 1 gigabyte in size, so users tight on diskspace can run <code class="code highlight bash docutils literal highlight-bash">nox</code> with the <code class="code highlight bash docutils literal highlight-bash">small-disk</code> option. This removes the other environment caches before each session is ran (note that this will take longer to run).</p>
<p>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.</p>
<p>Contributions you make to the Kernel Tuner should not break any of the tests even if you cannot run them locally.</p>
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit d88adec

Please sign in to comment.