Add simple clinfo test for PoCL

This commit is contained in:
Aleix Boné 2025-10-08 15:23:08 +02:00
parent 1fe7048d95
commit c7ce05e8b7
No known key found for this signature in database
2 changed files with 28 additions and 0 deletions

View File

@ -93,6 +93,8 @@ let
clangNosvOmpv-ld = callPackage ./test/compilers/clang-openmp-ld.nix {
stdenv = final.stdenvClangOmpss2NodesOmpv;
};
pocl = callPackage ./test/compilers/pocl.nix { };
};
pkgs = filterAttrs (_: isDerivation) bscPkgs;

26
test/compilers/pocl.nix Normal file
View File

@ -0,0 +1,26 @@
{
runCommand,
pocl,
clinfo,
writableTmpDirAsHomeHook,
}:
runCommand "clinfo-pocl"
{
nativeBuildInputs = [
clinfo
writableTmpDirAsHomeHook
];
requiredSystemFeatures = [ "sys-devices" ];
env = {
POCL_DEBUG = "error,warn";
OCL_ICD_VENDORS = "${pocl}/etc/OpenCL/vendors";
};
}
''
set -x
clinfo | tee $out
set +x
''