From c7ce05e8b77878461a8521eed3609b9aa1908414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Wed, 8 Oct 2025 15:23:08 +0200 Subject: [PATCH] Add simple clinfo test for PoCL --- overlay.nix | 2 ++ test/compilers/pocl.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/compilers/pocl.nix diff --git a/overlay.nix b/overlay.nix index 91cebbe..04c6ad8 100644 --- a/overlay.nix +++ b/overlay.nix @@ -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; diff --git a/test/compilers/pocl.nix b/test/compilers/pocl.nix new file mode 100644 index 0000000..054949a --- /dev/null +++ b/test/compilers/pocl.nix @@ -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 + ''