AMD GPU: Difference between revisions
→AMDVLK: editing code block to be updated for 24.11 and above |
CarlenWhite (talk | contribs) m Fix headers |
||
| Line 42: | Line 42: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Special Configuration = | == Special Configuration == | ||
The following configurations are only required if you have a specific reason for needing them. They are not expected to be necessary for a typical desktop / gaming setup. | The following configurations are only required if you have a specific reason for needing them. They are not expected to be necessary for a typical desktop / gaming setup. | ||
== Enable Southern Islands (SI) and Sea Islands (CIK) support == | === Enable Southern Islands (SI) and Sea Islands (CIK) support === | ||
The oldest architectures that AMDGPU supports are [[wikipedia:Radeon_HD_7000_series|Southern Islands (SI, i.e. GCN 1)]] and [[wikipedia:Radeon_HD_8000_series|Sea Islands (CIK, i.e. GCN 2)]], but support for them is disabled by default. To use AMDGPU instead of the <code>radeon</code> driver, you can set the kernel parameters: | The oldest architectures that AMDGPU supports are [[wikipedia:Radeon_HD_7000_series|Southern Islands (SI, i.e. GCN 1)]] and [[wikipedia:Radeon_HD_8000_series|Sea Islands (CIK, i.e. GCN 2)]], but support for them is disabled by default. To use AMDGPU instead of the <code>radeon</code> driver, you can set the kernel parameters: | ||
| Line 58: | Line 57: | ||
Doing this is required to use [[#Vulkan|Vulkan]] on these cards, as the <code>radeon</code> driver doesn't support it. | Doing this is required to use [[#Vulkan|Vulkan]] on these cards, as the <code>radeon</code> driver doesn't support it. | ||
== HIP == | === HIP === | ||
Most software has the HIP libraries hard-coded. You can work around it on NixOS by using: | Most software has the HIP libraries hard-coded. You can work around it on NixOS by using: | ||
| Line 79: | Line 77: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Blender === | ==== Blender ==== | ||
Hardware accelerated rendering can be achieved by using the package <syntaxhighlight lang="nix" inline="">blender-hip</syntaxhighlight>. | Hardware accelerated rendering can be achieved by using the package <syntaxhighlight lang="nix" inline="">blender-hip</syntaxhighlight>. | ||
Currently, you need to [[Linux kernel|use the latest kernel]] for <syntaxhighlight lang="nix" inline="">blender-hip</syntaxhighlight> to work. | Currently, you need to [[Linux kernel|use the latest kernel]] for <syntaxhighlight lang="nix" inline="">blender-hip</syntaxhighlight> to work. | ||
== OpenCL == | === OpenCL === | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ]; | hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ]; | ||
| Line 93: | Line 89: | ||
You should also install the <code>clinfo</code> package to verify that OpenCL is correctly setup (or check in the program you use to see if it is now available, such as in Darktable). | You should also install the <code>clinfo</code> package to verify that OpenCL is correctly setup (or check in the program you use to see if it is now available, such as in Darktable). | ||
=== Radeon 500 series (aka Polaris) === | ==== Radeon 500 series (aka Polaris) ==== | ||
As of [https://github.com/ROCm/ROCm/issues/1659 ROCm 4.5], AMD has disabled OpenCL on Polaris-based cards. This can be re-enabled by setting the environment variable <code>ROC_ENABLE_PRE_VEGA=1</code> | As of [https://github.com/ROCm/ROCm/issues/1659 ROCm 4.5], AMD has disabled OpenCL on Polaris-based cards. This can be re-enabled by setting the environment variable <code>ROC_ENABLE_PRE_VEGA=1</code> | ||
| Line 103: | Line 98: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Older GPUs (TeraScale) === | ==== Older GPUs (TeraScale) ==== | ||
<!-- FIXME this should be moved to a dedicated page for the "radeon" driver or OpenCL, if either of those are created at some point in the future --> | <!-- FIXME this should be moved to a dedicated page for the "radeon" driver or OpenCL, if either of those are created at some point in the future --> | ||
| Line 127: | Line 122: | ||
Merely installing <code>mesa.opencl</code> with <code>nix-shell -p</code> will not work; it needs to be present at build-time for the OpenCL ICD loader, which only searches static paths. | Merely installing <code>mesa.opencl</code> with <code>nix-shell -p</code> will not work; it needs to be present at build-time for the OpenCL ICD loader, which only searches static paths. | ||
== Vulkan == | === Vulkan === | ||
Vulkan is already enabled by default (using Mesa RADV) on 64 bit applications. The settings to control it are: | Vulkan is already enabled by default (using Mesa RADV) on 64 bit applications. The settings to control it are: | ||
| Line 136: | Line 130: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== AMDVLK === | ==== AMDVLK ==== | ||
The AMDVLK drivers can be used in addition to the Mesa RADV drivers. The program will choose which one to use: | The AMDVLK drivers can be used in addition to the Mesa RADV drivers. The program will choose which one to use: | ||
| Line 162: | Line 155: | ||
More information can be found here: https://nixos.org/manual/nixos/unstable/index.html#sec-gpu-accel-vulkan | More information can be found here: https://nixos.org/manual/nixos/unstable/index.html#sec-gpu-accel-vulkan | ||
== GUI tools == | === GUI tools === | ||
==== LACT - Linux AMDGPU Controller ==== | ==== LACT - Linux AMDGPU Controller ==== | ||