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

This commit is contained in:
Luna Nova
2026-03-09 17:13:53 -07:00
parent d981af9288
commit b9cfeaffa4
2 changed files with 50 additions and 0 deletions
@@ -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,
@@ -0,0 +1,37 @@
{
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 ];
};
}