Unverified Commit efabf4ba authored by Luna Nova's avatar Luna Nova
Browse files

rocmPackages.rocm-tests: add linkFarm of all available rocmPackages

is this a good idea? I sometimes used the meta join as a fast way to
kick off a build of rocmPackages.*
parent 220b77c1
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
{
  lib,
  linkFarm,
  clr,
  ollama,
  python3Packages,
@@ -8,6 +10,22 @@
  stdenv,
}:
# This package exists purely to have a bunch of passthru.tests attrs
let
  availableRocmDrvs = lib.pipe rocmPackages [
    (lib.mapAttrsToList (
      name: value: {
        inherit name;
        evaluated = builtins.tryEval value;
      }
    ))
    (builtins.filter (x: x.evaluated.success))
    (map (x: {
      inherit (x) name;
      value = x.evaluated.value;
    }))
    (builtins.filter (x: lib.isDerivation x.value && (x.value.meta.available or true)))
  ];
in
stdenv.mkDerivation {
  name = "rocm-tests";
  nativeBuildInputs = [
@@ -20,6 +38,12 @@ stdenv.mkDerivation {
      inherit rocmPackages;
      acceleration = "rocm";
    };
    rocmPackagesDerivations = linkFarm "rocmPackagesDerivations" (
      map (x: {
        name = x.name;
        path = x.value;
      }) availableRocmDrvs
    );
    torch = python3Packages.torch.override {
      inherit rocmPackages;
      rocmSupport = true;