diff --git a/overlay.nix b/overlay.nix index d242e7a..50bad77 100644 --- a/overlay.nix +++ b/overlay.nix @@ -83,7 +83,9 @@ let hello-sycl = callPackage ./test/compilers/hello-sycl.nix { }; hello-syclompss = callPackage ./test/compilers/icpx-ompss2.nix { }; hello-sycl-pocl = (callPackage ./test/compilers/hello-sycl.nix { }).withPocl; + hello-sycl-intel = (callPackage ./test/compilers/hello-sycl.nix { }).withIntel; hello-syclompss-pocl = (callPackage ./test/compilers/icpx-ompss2.nix { }).withPocl; + hello-syclompss-intel = (callPackage ./test/compilers/icpx-ompss2.nix { }).withIntel; lto = callPackage ./test/compilers/lto.nix { }; asan = callPackage ./test/compilers/asan.nix { }; diff --git a/test/compilers/hello-sycl.nix b/test/compilers/hello-sycl.nix index 1438ae4..9bdec07 100644 --- a/test/compilers/hello-sycl.nix +++ b/test/compilers/hello-sycl.nix @@ -61,19 +61,31 @@ stdenv.mkDerivation (finalAttrs: { cp test-output $out ''; - passthru.withPocl = finalAttrs.finalPackage.overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; - env = (old.env or { }) // { - POCL_DEBUG = "error,warn"; - POCL_CACHE_DIR = "/build/pocl_cache"; + passthru = { + withPocl = finalAttrs.finalPackage.overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; + env = (old.env or { }) // { + POCL_DEBUG = "error,warn"; + POCL_CACHE_DIR = "/build/pocl_cache"; - # 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; - }; - doInstallCheck = true; - installCheckPhase = '' - grep "Hello World! (on device)" $out - ''; - }); + # 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; + }; + doInstallCheck = true; + installCheckPhase = '' + grep "Hello World! (on device)" $out + ''; + }); + withIntel = finalAttrs.finalPackage.overrideAttrs (old: { + env = (old.env or { }) // { + OCL_ICD_VENDORS = intelPackages.compiler + "/etc/OpenCL/vendors"; + }; + doInstallCheck = true; + installCheckPhase = '' + grep "Hello World! (on device)" $out + ''; + + }); + }; }) diff --git a/test/compilers/icpx-ompss2.nix b/test/compilers/icpx-ompss2.nix index e41a10a..21ce103 100644 --- a/test/compilers/icpx-ompss2.nix +++ b/test/compilers/icpx-ompss2.nix @@ -49,21 +49,33 @@ intelPackages.stdenv.mkDerivation (finalAttrs: { nosv ]; - passthru.withPocl = finalAttrs.finalPackage.overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; - env = (old.env or { }) // { - POCL_DEBUG = "error,warn"; - POCL_CACHE_DIR = "/build/pocl_cache"; + passthru = { + withPocl = finalAttrs.finalPackage.overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [ pocl ]; + env = (old.env or { }) // { + POCL_DEBUG = "error,warn"; + POCL_CACHE_DIR = "/build/pocl_cache"; - # 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; - }; - doInstallCheck = true; - installCheckPhase = '' - grep "Hello World! (on device)" $out - ''; - }); + # 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; + }; + doInstallCheck = true; + installCheckPhase = '' + grep "Hello World! (on device)" $out + ''; + }); + + withIntel = finalAttrs.finalPackage.overrideAttrs (old: { + env = (old.env or { }) // { + OCL_ICD_VENDORS = intelPackages.compiler + "/etc/OpenCL/vendors"; + }; + doInstallCheck = true; + installCheckPhase = '' + grep "Hello World! (on device)" $out + ''; + }); + }; dontUnpack = true; dontConfigure = true;