From 2d90a92e698db91a04b1618fec5b95a430b6f1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Fri, 20 Mar 2026 15:36:52 +0100 Subject: [PATCH] Fix PoCL SYCL tests Reviewed-by: Rodrigo Arias Mallo --- test/compilers/hello-sycl.nix | 6 +++++- test/compilers/icpx-ompss2.nix | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/compilers/hello-sycl.nix b/test/compilers/hello-sycl.nix index 9bdec078..ca421840 100644 --- a/test/compilers/hello-sycl.nix +++ b/test/compilers/hello-sycl.nix @@ -26,7 +26,7 @@ let cgh.single_task([=]() { os << "Hello World! (on device)\n"; }); - }); + }).wait(); return 0; } catch (sycl::exception &e) { @@ -64,6 +64,7 @@ stdenv.mkDerivation (finalAttrs: { passthru = { withPocl = finalAttrs.finalPackage.overrideAttrs (old: { nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; + name = old.name + "-pocl"; env = (old.env or { }) // { POCL_DEBUG = "error,warn"; POCL_CACHE_DIR = "/build/pocl_cache"; @@ -71,6 +72,8 @@ stdenv.mkDerivation (finalAttrs: { # Make PoCL report Intel vendor id so oneapi SYCL works POCL_DRIVER_VERSION_OVERRIDE = "2024.18.6.0.02_160000"; POCL_CPU_VENDOR_ID_OVERRIDE = 32902; + + HWLOC_SYNTHETIC = "node:1 core:1 pu:1"; }; doInstallCheck = true; installCheckPhase = '' @@ -78,6 +81,7 @@ stdenv.mkDerivation (finalAttrs: { ''; }); withIntel = finalAttrs.finalPackage.overrideAttrs (old: { + name = old.name + "-intel"; env = (old.env or { }) // { OCL_ICD_VENDORS = intelPackages.compiler + "/etc/OpenCL/vendors"; }; diff --git a/test/compilers/icpx-ompss2.nix b/test/compilers/icpx-ompss2.nix index d6d320c7..e9f79686 100644 --- a/test/compilers/icpx-ompss2.nix +++ b/test/compilers/icpx-ompss2.nix @@ -52,6 +52,7 @@ intelPackages.stdenv.mkDerivation (finalAttrs: { passthru = { withPocl = finalAttrs.finalPackage.overrideAttrs (old: { nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; + name = old.name + "-pocl"; env = (old.env or { }) // { POCL_DEBUG = "error,warn"; POCL_CACHE_DIR = "/build/pocl_cache"; @@ -59,6 +60,8 @@ intelPackages.stdenv.mkDerivation (finalAttrs: { # Make PoCL report Intel vendor id so oneapi SYCL works POCL_DRIVER_VERSION_OVERRIDE = "2024.18.6.0.02_160000"; POCL_CPU_VENDOR_ID_OVERRIDE = 32902; + + HWLOC_SYNTHETIC = "node:1 core:1 pu:1"; }; doInstallCheck = true; installCheckPhase = '' @@ -67,6 +70,7 @@ intelPackages.stdenv.mkDerivation (finalAttrs: { }); withIntel = finalAttrs.finalPackage.overrideAttrs (old: { + name = old.name + "-intel"; env = (old.env or { }) // { OCL_ICD_VENDORS = intelPackages.compiler + "/etc/OpenCL/vendors"; };