CUDA: Difference between revisions

imported>Zylanx
Fix the shells to be buildable and fix the formatting of the files wrt. angle brackets. Is there a better fix for that?
imported>Hypnosis2839
m update GH links to point to master rather than old rev
Line 7: Line 7:
== <code>cudatoolkit</code>, <code>cudnn</code>, and related packages ==
== <code>cudatoolkit</code>, <code>cudnn</code>, and related packages ==


The CUDA toolkit is available in a [https://search.nixos.org/packages?channel=unstable&from=0&size=50&buckets=%7B%22package_attr_set%22%3A%5B%22cudaPackages%22%5D%2C%22package_license_set%22%3A%5B%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=cudatoolkit number of different versions]. Please use the latest major version. You can see where they're defined in nixpkgs [https://github.com/NixOS/nixpkgs/blob/4d5b1d6b273fc4acd5dce966d2e9c0ca197b6df2/pkgs/development/compilers/cudatoolkit/default.nix here].
The CUDA toolkit is available in a [https://search.nixos.org/packages?channel=unstable&from=0&size=50&buckets=%7B%22package_attr_set%22%3A%5B%22cudaPackages%22%5D%2C%22package_license_set%22%3A%5B%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=cudatoolkit number of different versions]. Please use the latest major version. You can see where they're defined in nixpkgs [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/cudatoolkit/default.nix here].


Several "CUDA-X" libraries are packages as well. In particular,
Several "CUDA-X" libraries are packages as well. In particular,
* cuDNN is packaged [https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/development/libraries/science/math/cudnn/default.nix here].
* cuDNN is packaged [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/cudnn/default.nix here].
* cuTENSOR is packaged [https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/development/libraries/science/math/cutensor/default.nix here].
* cuTENSOR is packaged [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/cutensor/default.nix here].


'''Note that these examples haven't been updated in a while (as of 2022-03-12). May not be the best solution. A better resource is likely the packaging CUDA sample code [https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/test/cuda/cuda-library-samples/generic.nix here].'''
'''Note that these examples haven't been updated in a while (as of 2022-03-12). May not be the best solution. A better resource is likely the packaging CUDA sample code [https://github.com/NixOS/nixpkgs/blob/master/pkgs/test/cuda/cuda-library-samples/generic.nix here].'''


There are some possible ways to setup a development environment using CUDA on NixOS. This can be accomplished in the following ways:
There are some possible ways to setup a development environment using CUDA on NixOS. This can be accomplished in the following ways: