mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-09 22:19:42 +00:00
amdgpu: Enable OpenCL & HIP
This commit is contained in:
parent
b371662ad0
commit
0f76593d32
|
@ -22,13 +22,24 @@ in
|
||||||
vulkan-extension-layer
|
vulkan-extension-layer
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable OpenGL
|
hardware = {
|
||||||
hardware.graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Enable OpenCL and AMDVLK
|
# Enable AMDVLK (AMD's open-source Vulkan driver)
|
||||||
extraPackages = with pkgs; [ amdvlk ];
|
extraPackages = with pkgs; [ amdvlk ];
|
||||||
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
|
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# OpenCL (Universal GPU computing API - not AMD specific)
|
||||||
|
# To check if this works, run: `nix run nixpkgs#clinfo` (after rebooting)
|
||||||
|
opengl.extraPackages = with pkgs; [rocmPackages.clr.icd];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# HIP (SDK that allows running CUDA code on AMD GPUs)
|
||||||
|
# Most software has the paths hard-coded
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue