AMD GPU: Difference between revisions

Smudgebun (talk | contribs)
Blender: Replace the (outdated as of https://github.com/NixOS/nixpkgs/pull/463064) Blender HIP information with a link to the HIP section of the Blender page. Goal is to centralize Blender information to one place to make keeping it up-to-date it easier.
Smudgebun (talk | contribs)
Blender: Converted to a general section on ROCm and HIP enabling for packages, linked to the Blender page HIP section for Blender-specific information.
Line 70: Line 70:
</syntaxhighlight>
</syntaxhighlight>


==== Blender ====
=== Enabling  ROCm & HIP For Packages ===
For running Blender with HIP support, see: [[Blender#HIP]].
Whether or not a package is built with ROCm support is controlled by the <code>rocmSupport</code> nixpkgs config variable. As HIP is a component of ROCm, anything that needs HIP support (e.g. Blender) gets that enabled through <code>rocmSupport</code> too.
 
You can set it globally with this line
 
<syntaxhighlight lang="nix">
nixpkgs.config.rocmSupport = true;
</syntaxhighlight>
 
Or override specific packages
 
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
(ffmpeg-full.override {config.rocmSupport=true;})
pkgsRocm.ffmpeg-full # equivalent to (ffmpeg-full.override {config.rocmSupport=true;}) for packages in ROCm Release attrPaths
];
 
</syntaxhighlight>
 
While most if not all packages that support ROCm should be in the [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/rocm-modules/release-attrPaths.json ROCm Release attrPaths], and therefore built by Hydra and cached in cache.nixos.org with <code>rocmSupport</code>, enabling it globally still has a slight chance of pointless compiling on your machine.
 
For Blender-specific information on setting up HIP support, see: [[Blender#HIP]].


=== OpenCL ===
=== OpenCL ===