Skip to content

Commit 3370bf0

Browse files
committed
Some more faqs
1 parent ca27952 commit 3370bf0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/maintainer/knowledge_base.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,10 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
11531153
package is to set some environment variables (``CUDA_HOME``, as well as ``CFLAGS`` and friends),
11541154
as well as wrapping the real ``nvcc`` executable to set some extra command line arguments.
11551155

1156+
In practice, to enable CUDA on your package, add ``{{ compiler('cuda') }}`` to the ``build``
1157+
section of your requirements and rerender! The matching ``cudatoolkit`` will be added to the ``run``
1158+
requirements automatically.
1159+
11561160
.. note::
11571161

11581162
**How is CUDA provided at the system level?**
@@ -1164,9 +1168,16 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
11641168
`conda-forge-ci-setup <https://github.com/conda-forge/conda-forge-ci-setup-feedstock/>`_ scripts.
11651169
Do note that the Nvidia executable won't install the drivers because no GPU is present in the machine.
11661170

1167-
In practice, to enable CUDA on your package, add ``{{ compiler('cuda') }}`` to the ``build``
1168-
section of your requirements. The matching ``cudatoolkit`` will be added to the ``run``
1169-
requirements automatically.
1171+
**How is ``cudatoolkit`` selected at install time?**
1172+
1173+
Conda exposes the maximum CUDA version supported by the installed Nvidia drivers through a virtual package
1174+
named ``__cuda``. By default, ``conda`` will install the highest version available
1175+
for the packages involved. However, prior to v4.8.4, ``__cuda`` versions would not be part of the
1176+
constraints, so you would always get the latest one, regardless the supported CUDA version.
1177+
1178+
If for some reason you want to install a specific version, you can use::
1179+
1180+
conda install your-gpu-package cudatoolkit==10.1
11701181

11711182
Testing the packages
11721183
--------------------
@@ -1207,6 +1218,11 @@ If your package requires both CUDA and some CDTs on Linux, you will need to patc
12071218

12081219
This should be fixed at some point, but for now you need to do it manually. Apologies!
12091220

1221+
Submitting CUDA-enabled packages
1222+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1223+
Right now, ``staged-recipes`` cannot build CUDA-enabled packages. You will have to
1224+
start with a simpler version (CPU only) and then add the CUDA bits once you
1225+
have obtained a feedstock.
12101226

12111227
Adding support for a new CUDA version
12121228
-------------------------------------

0 commit comments

Comments
 (0)