CUDA: Difference between revisions

Smudgebun (talk | contribs)
m Some things to keep in mind when setting up CUDA in NixOS: Update `hardware.opengl` to the new name `hardware.graphics`
Smudgebun (talk | contribs)
Some things to keep in mind when setting up CUDA in NixOS: Added in-line code examples and a link to the Blender page's CUDA section.
Line 184: Line 184:
* Some GPUs, like Tesla K80, don't work with the latest drivers, so you must specify them in the option <code>hardware.nvidia.package</code> getting the value from your selected kernel, for example, <code>config.boot.kernelPackages.nvidia_x11_legacy470</code>. You can check which driver version your GPU supports by visiting the  [https://www.nvidia.com/Download/index.aspx nvidia site] and checking the driver version.
* Some GPUs, like Tesla K80, don't work with the latest drivers, so you must specify them in the option <code>hardware.nvidia.package</code> getting the value from your selected kernel, for example, <code>config.boot.kernelPackages.nvidia_x11_legacy470</code>. You can check which driver version your GPU supports by visiting the  [https://www.nvidia.com/Download/index.aspx nvidia site] and checking the driver version.
* Even with the drivers correctly installed, some software, like Blender, may not see the CUDA GPU. Make sure your system configuration has the option <code>hardware.graphics.enable</code> enabled.
* Even with the drivers correctly installed, some software, like Blender, may not see the CUDA GPU. Make sure your system configuration has the option <code>hardware.graphics.enable</code> enabled.
* By default, software packaged in source code form has CUDA support disabled, because of the unfree license. To solve this, you can enable builds with CUDA support with a nixpkgs wide configuration, or use binary packaged CUDA compatible software such as [https://github.com/edolstra/nix-warez/tree/master/blender blender-bin].
* By default, software packaged in source code form has CUDA support disabled, because of the unfree license. To solve this, you can enable builds with CUDA support with a nixpkgs wide configuration <code>nixpkgs.config.cudaSupport = true;</code>, individual overrides e.g. <code>environment.systemPackages = with pkgs; [ (blender.override {config.cudaSupport=true;}) ];</code>, or use binary packaged CUDA compatible software such as [https://github.com/edolstra/nix-warez/tree/master/blender blender-bin].
* For setting up Blender with CUDA see: [[Blender#CUDA & OptiX]].


== CUDA under WSL ==
== CUDA under WSL ==