@@ -1153,6 +1153,10 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
1153
1153
package is to set some environment variables (``CUDA_HOME ``, as well as ``CFLAGS `` and friends),
1154
1154
as well as wrapping the real ``nvcc `` executable to set some extra command line arguments.
1155
1155
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
+
1156
1160
.. note ::
1157
1161
1158
1162
**How is CUDA provided at the system level? **
@@ -1164,9 +1168,16 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
1164
1168
`conda-forge-ci-setup <https://github.com/conda-forge/conda-forge-ci-setup-feedstock/ >`_ scripts.
1165
1169
Do note that the Nvidia executable won't install the drivers because no GPU is present in the machine.
1166
1170
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
1170
1181
1171
1182
Testing the packages
1172
1183
--------------------
@@ -1207,6 +1218,11 @@ If your package requires both CUDA and some CDTs on Linux, you will need to patc
1207
1218
1208
1219
This should be fixed at some point, but for now you need to do it manually. Apologies!
1209
1220
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.
1210
1226
1211
1227
Adding support for a new CUDA version
1212
1228
-------------------------------------
0 commit comments