forked from rarias/jungle
Add OpenCL Conformance Tests to PoCL
This commit is contained in:
parent
aacfbbd4a1
commit
5a8e363e6a
@ -14,6 +14,8 @@
|
|||||||
python3,
|
python3,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
writeText,
|
writeText,
|
||||||
|
runCommand,
|
||||||
|
opencl-cts,
|
||||||
|
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
|
||||||
@ -201,12 +203,38 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
passthru = {
|
passthru =
|
||||||
updateScript = nix-update-script { };
|
let
|
||||||
git = finalAttrs.finalPackage.override { useGit = true; };
|
self = finalAttrs.finalPackage;
|
||||||
test = finalAttrs.finalPackage.overrideAttrs { doCheck = true; };
|
in
|
||||||
withICD = enableICD;
|
{
|
||||||
};
|
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";
|
env.HWLOC_SYNTHETIC = lib.optionalDrvAttr enableHWLOC "node:1 core:1 pu:1";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user