AMD GPU: Difference between revisions

Komo (talk | contribs)
Fix and improve section "AMD iGPU with high amount of RAM" and fix double space on "Enabling ROCm & HIP For Packages" title.
Artturin (talk | contribs)
amdgpu.ids
 
(One intermediate revision by one other user not shown)
Line 12: Line 12:


=== AMD iGPU with high amount of RAM ===
=== AMD iGPU with high amount of RAM ===
The iGPU uses system RAM and has no dedicated VRAM. On many systems its possible to set the amount of VRAM in BIOS: "Auto" or the lowest amount is enough. To set the maximum RAM that the iGPU, you can add <code>ttm pages_limit</code> and <code>ttm page_pool_size</code> in <code>boot.extraModprobeConfig</code> option.<syntaxhighlight lang="nix"># Sets a high amount of GTT size for LLM usage.
The iGPU uses system RAM and has no dedicated VRAM. On many systems its possible to set the amount of VRAM in BIOS: "Auto" or the lowest amount is enough. To set the maximum RAM that the iGPU use, you can add <code>ttm pages_limit</code> and <code>ttm page_pool_size</code> in <code>boot.extraModprobeConfig</code> option.<syntaxhighlight lang="nix"># Sets a high amount of GTT size for LLM usage.
boot.extraModprobeConfig = ''
boot.extraModprobeConfig = ''
   # Specified as 4KiB pages: 120 GB GTT.
   # Specified as 4KiB pages: 120 GB GTT.
Line 274: Line 274:
hardware.firmware = [ pkgs.linux-firmware ];
hardware.firmware = [ pkgs.linux-firmware ];
</syntaxhighlight>
</syntaxhighlight>
=== PyTorch does not show the the GPU model and prints <code>(null): No such file or directory</code> ===
<syntaxhighlight lang="shell">$ python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"
(null): No such file or directory
(null): No such file or directory
True AMD Radeon Graphics</syntaxhighlight>It happens because torch cannot find <code>amdgpu.ids</code><syntaxhighlight lang="nix">systemd.tmpfiles.rules = [
  "L+    /opt/amdgpu/share/libdrm/amdgpu.ids  -    -    -    -    ${pkgs.libdrm}/share/libdrm/amdgpu.ids"
];</syntaxhighlight><code>True AMD Radeon RX 9060 XT</code>


== See Also ==
== See Also ==