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

rocmPackages.miopen: add impureTests that verify conv/pool functionality

parent d981af92
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -274,6 +274,19 @@ stdenv.mkDerivation (finalAttrs: {

  requiredSystemFeatures = [ "big-parallel" ];

  passthru.impureTests = {
    # bash $(nix-build -A rocmPackages.miopen.passthru.impureTests.conv)
    conv = callPackage ./test-runtime-compilation.nix {
      miopen = finalAttrs.finalPackage;
      name = "conv";
      testScript = "MIOpenDriver conv -n 1 -c 1 -H 4 -W 4 -k 1 -y 3 -x 3 -p 0 -q 0 -V 0";
    };
    pool = callPackage ./test-runtime-compilation.nix {
      miopen = finalAttrs.finalPackage;
      name = "pool";
      testScript = "MIOpenDriver pool -W 1x1x4x4 -y 2 -x 2 -p 0 -q 0 -F 1 -V 0";
    };
  };
  passthru.tests = {
    # Ensure all .tn.model files can be loaded by whatever version of frugally-deep we have
    # This is otherwise hard to verify as MIOpen will only use these models on specific,
+37 −0
Original line number Diff line number Diff line
{
  lib,
  makeImpureTest,
  writableTmpDirAsHomeHook,
  miopen,
  clr,
  rocm-smi,
  name,
  testScript,
}:

makeImpureTest {
  inherit name;
  testedPackage = "rocmPackages.miopen";

  sandboxPaths = [
    "/sys"
    "/dev/dri"
    "/dev/kfd"
  ];

  nativeBuildInputs = [
    writableTmpDirAsHomeHook
    miopen
    clr
    rocm-smi
  ];

  testScript = ''
    rocm-smi
    ${testScript}
  '';

  meta = {
    teams = [ lib.teams.rocm ];
  };
}