forked from rarias/jungle
Add test for sycl-ls with PoCL and Intel OCL
This commit is contained in:
40
test/compilers/sycl-ls.nix
Normal file
40
test/compilers/sycl-ls.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
intelPackages,
|
||||
pocl,
|
||||
runCommandWith,
|
||||
symlinkJoin,
|
||||
clinfo,
|
||||
}:
|
||||
|
||||
runCommandWith
|
||||
{
|
||||
name = "sycl-ls";
|
||||
inherit (intelPackages) stdenv;
|
||||
runLocal = true;
|
||||
derivationArgs = {
|
||||
nativeBuildInputs = [ clinfo ];
|
||||
env = {
|
||||
OCL_ICD_VENDORS = symlinkJoin {
|
||||
name = "vendors";
|
||||
paths = builtins.map (p: p + "/etc/OpenCL/vendors") [
|
||||
intelPackages.compiler
|
||||
pocl
|
||||
];
|
||||
};
|
||||
|
||||
POCL_DRIVER_VERSION_OVERRIDE = "2024.18.6.0.02_160000";
|
||||
POCL_CPU_VENDOR_ID_OVERRIDE = 32902;
|
||||
POCL_DEBUG = "error,warn";
|
||||
POCL_CACHE_DIR = "/build/pocl_cache";
|
||||
|
||||
HWLOC_SYNTHETIC = "node:1 core:1 pu:1";
|
||||
};
|
||||
};
|
||||
}
|
||||
# bash
|
||||
''
|
||||
clinfo -l | tee -a $out
|
||||
sycl-ls | tee -a $out
|
||||
|
||||
test x6 = x"$(cat $out | wc -l)" # 2 lines per clinfo entry and 1 per sycl-ls
|
||||
''
|
||||
Reference in New Issue
Block a user