[Hardware/AMD] Begin rocm-overlay suport

This commit is contained in:
Antoine Viallon 2022-10-12 18:50:45 +02:00
parent 3dc72fae02
commit 1e54cd710b
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -2,6 +2,7 @@
with lib;
let
cfg = config.aviallon.hardware.amd;
devCfg = config.aviallon.developer;
generalCfg = config.aviallon.general;
in
{
@ -24,9 +25,16 @@ in
"amdgpu.mes" = mkIf generalCfg.unsafeOptimizations 1;
};
environment.systemPackages = with pkgs; [
rocm-smi
];
environment.systemPackages = with pkgs; []
++ [
rocm-smi
]
++ optionals devCfg.enable ([]
++ [ rocminfo ]
++ optional (hasAttr "hipify-perl" pkgs) pkgs.hipify-perl
++ optional (hasAttr "tensorflow2-rocm" pkgs) pkgs.tensorflow2-rocm
)
;
services.xserver.videoDrivers = []
++ optional cfg.useProprietary "amdgpu-pro"
@ -35,6 +43,7 @@ in
"radeon"
];
hardware.opengl.enable = true;
hardware.opengl.extraPackages = with pkgs; mkIf (!cfg.useProprietary) [
rocm-opencl-icd
rocm-opencl-runtime