forked from rarias/jungle
Add OpenCL Conformance Tests to PoCL
This commit is contained in:
parent
1dec96e20b
commit
9d86074f22
@ -14,6 +14,8 @@
|
||||
python3,
|
||||
writableTmpDirAsHomeHook,
|
||||
writeText,
|
||||
runCommand,
|
||||
opencl-cts,
|
||||
|
||||
fetchFromGitHub,
|
||||
|
||||
@ -201,12 +203,38 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
''
|
||||
);
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
git = finalAttrs.finalPackage.override { useGit = true; };
|
||||
test = finalAttrs.finalPackage.overrideAttrs { doCheck = true; };
|
||||
withICD = enableICD;
|
||||
};
|
||||
passthru =
|
||||
let
|
||||
self = finalAttrs.finalPackage;
|
||||
in
|
||||
{
|
||||
updateScript = nix-update-script { };
|
||||
git = self.override { useGit = true; };
|
||||
|
||||
withICD = enableICD;
|
||||
|
||||
test = {
|
||||
# Run builtin tests (causes a rebuild)
|
||||
self = self.overrideAttrs { doCheck = true; };
|
||||
|
||||
# Run basic test from Khronos OpenCL Conformance Test Suite
|
||||
# WARN: despite its name, test_basic is very exhaustive, and can take more
|
||||
# than 1 hour in a marenostrum5 node.
|
||||
cts =
|
||||
assert enableICD;
|
||||
lib.genAttrs [ "api" "basic" "c11_atomics" "printf" "svm" ] (
|
||||
name:
|
||||
runCommand "pocl-cts-test_${name}" {
|
||||
nativeBuildInputs = [ self ];
|
||||
requiredSystemFeatures = [ "sys-devices" ];
|
||||
env = {
|
||||
POCL_DEBUG = "error,warn";
|
||||
POCL_CACHE_DIR = "/build/pocl_cache";
|
||||
};
|
||||
} "${opencl-cts}/bin/Release/test_${name} | tee $out"
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
env.HWLOC_SYNTHETIC = lib.optionalDrvAttr enableHWLOC "node:1 core:1 pu:1";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user