mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Hardware/AMD/ROCm] attempt fix
This commit is contained in:
parent
183a38ec0b
commit
60ee53b417
1 changed files with 15 additions and 14 deletions
|
|
@ -45,7 +45,7 @@ in {
|
||||||
description = "What is the GFX ISA of your system. Leave blank if you have several GPUs of incompatible ISAs";
|
description = "What is the GFX ISA of your system. Leave blank if you have several GPUs of incompatible ISAs";
|
||||||
default = "";
|
default = "";
|
||||||
example = "gfx902";
|
example = "gfx902";
|
||||||
type = types.string;
|
type = types.str;
|
||||||
};
|
};
|
||||||
gpuTargets = mkOption {
|
gpuTargets = mkOption {
|
||||||
description = "Override supported GPU ISAs in some ROCm packages.";
|
description = "Override supported GPU ISAs in some ROCm packages.";
|
||||||
|
|
@ -105,21 +105,22 @@ in {
|
||||||
|
|
||||||
nixpkgs.config.rocmSupport = true;
|
nixpkgs.config.rocmSupport = true;
|
||||||
|
|
||||||
nixpkgs.overlays = mkBefore [(final: prev: {
|
nixpkgs.overlays = mkIf (! isNull localCfg.gpuTargets) (mkBefore [(final: prev: {
|
||||||
rocmPackages_5 = final.rocmPackages;
|
#rocmPackages_5 = final.rocmPackages;
|
||||||
rocmPackages = prev.rocmPackages // {
|
rocmPackages = prev.rocmPackages // {
|
||||||
clr = prev.rocmPackages.clr.overrideAttrs (oldAttrs: {
|
clr = prev.rocmPackages.clr.override { localGpuTargets = localCfg.gpuTargets; };
|
||||||
passthru = oldAttrs.passthru // {
|
# (oldAttrs: {
|
||||||
# We cannot use this for each ROCm library, as each defines their own supported targets
|
# passthru = oldAttrs.passthru // {
|
||||||
# See: https://github.com/ROCm/ROCm/blob/77cbac4abab13046ee93d8b5bf410684caf91145/README.md#library-target-matrix
|
# # We cannot use this for each ROCm library, as each defines their own supported targets
|
||||||
gpuTargets = lib.forEach localCfg.gpuTargets (target: "gfx${target}");
|
# # See: https://github.com/ROCm/ROCm/blob/77cbac4abab13046ee93d8b5bf410684caf91145/README.md#library-target-matrix
|
||||||
};
|
# gpuTargets = lib.forEach localCfg.gpuTargets (target: "gfx${target}");
|
||||||
});
|
# };
|
||||||
|
#});
|
||||||
|
|
||||||
rocblas = prev.rocmPackages.rocblas.override {
|
#rocblas = prev.rocmPackages.rocblas.override {
|
||||||
gpuTargets = lib.forEach localCfg.gpuTargets (target: "gfx${target}");
|
# gpuTargets = lib.forEach localCfg.gpuTargets (target: "gfx${target}");
|
||||||
};
|
#};
|
||||||
};
|
};
|
||||||
})];
|
})]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue