[Hardware/AMD] tune system to better utilize ROCm

This commit is contained in:
Antoine Viallon 2024-05-13 02:16:38 +02:00
parent 3741bcd6b8
commit e82629a01b
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -47,8 +47,13 @@ in {
);
};
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
environment.variables = {
"AMD_VULKAN_ICD" = strings.toUpper cfg.defaultVulkanImplementation;
AMD_VULKAN_ICD = strings.toUpper cfg.defaultVulkanImplementation;
ROC_ENABLE_PRE_VEGA = "1"; # Enable OpenCL with Polaris GPUs
};
# Make rocblas and rocfft work
@ -57,5 +62,11 @@ in {
"/sys/devices/virtual/kfd?"
"/dev/dri/renderD128?"
];
nixpkgs.overlays = [(final: prev: {
# Overlay Blender to use the HIP build if we have a compatible AMD GPU
blender = final.blender-hip;
blender-prev = prev.blender;
})];
};
}