Blender: Difference between revisions

Smudgebun (talk | contribs)
m HIP: fixed package name
Smudgebun (talk | contribs)
Added more configuration examples
Line 75: Line 75:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.systemPackages = [
environment.systemPackages = with pkgs; [
   (blender.override {config.cudaSupport=true;})
   (blender.override {config.cudaSupport=true;})
# (pkgsRocm.blender.override {config.cudaSupport=true;}) # to compile blender with both HIP and CUDA/OptiX support
];
];
</syntaxhighlight>
</syntaxhighlight>
Line 88: Line 89:
With the deprecation of the <code>blender-hip</code> package,<ref name="deprecate-hip"> {{pull|463064}}</ref> the easiest way to add Blender with HIP support is now with the <code>pkgsRocm.blender</code> package. Other methods are to use the <code>rocmSupport</code> flag the same way as [[#The cudaSupport Flag|#The cudaSupport Flag]], or to use a [[#Binary Packages|#Binary Package]].
With the deprecation of the <code>blender-hip</code> package,<ref name="deprecate-hip"> {{pull|463064}}</ref> the easiest way to add Blender with HIP support is now with the <code>pkgsRocm.blender</code> package. Other methods are to use the <code>rocmSupport</code> flag the same way as [[#The cudaSupport Flag|#The cudaSupport Flag]], or to use a [[#Binary Packages|#Binary Package]].


Unlike <code>cudaSupport</code>, most if not all packages with <code>rocmSuppport</code> are built by Hydra and cached into cache.nixos.org. That said, it is still recommended to enable <code>rocmSupport</code> only as much as you will need it, to avoid that chance of unnecessary recompilation on your machine.
Unlike <code>cudaSupport</code>, most if not all packages with <code>rocmSuppport</code> are built by Hydra and cached into cache.nixos.org. That said, it is still recommended to enable <code>rocmSupport</code> only as much as you will need it, to avoid the chance of pointless recompilation on your machine.
 
To activate the flag globally, run the following.
 
<syntaxhighlight lang="nix"> nixpkgs.config.rocmSupport = true; </syntaxhighlight>
 
Or, override specifically Blender with HIP support.
 
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
  pkgsRocm.blender
# (blender.override {config.rocmSupport=true;}) # (equivalent to `pkgsRocm.blender`)
# (pkgsRocm.blender.override {config.cudaSupport=true;}) # to compile blender with both HIP and CUDA/OptiX support
];
</syntaxhighlight>


=== oneAPI ===
=== oneAPI ===