-
Notifications
You must be signed in to change notification settings - Fork 1
/
amd-gpu.nix
executable file
·31 lines (27 loc) · 963 Bytes
/
amd-gpu.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{pkgs, ...}: {
boot.initrd.kernelModules = ["amdgpu"];
services.xserver.videoDrivers = ["amdgpu"];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true; # Let's 32Bit GPU accelrated aplications run
# System-wide packages for ROCm (Radeon Open Compute), e.g. AI, etc
extraPackages = with pkgs; [
rocmPackages.clr.icd
rocm-opencl-icd
rocm-opencl-runtime
# TODO: Seems to not be working, VP8 and HVEC don't worky
#libva
libvdpau-va-gl
];
};
# Makes sure ROCm can be found by aplications
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
# Packages for ROCm e.g. AI, etc.
environment.systemPackages = [
pkgs.rocmPackages.rocm-smi # Gives GPU info e.g. RX 6800, 16GBs VRAM, core usage 12%, 2043MB VRAM used. Clone of nvidia-smi, not much to do with compute actually
pkgs.rocmPackages.rocminfo
];
}