Compare commits
12 Commits
5448fc75e1
...
5be04c5ff5
Author | SHA1 | Date | |
---|---|---|---|
5be04c5ff5 | |||
7da1b55d5e | |||
61c1779634 | |||
ea12c28793 | |||
91a89092a8 | |||
b3cab4639f | |||
01bda24821 | |||
967353d573 | |||
0e667db329 | |||
344579386d | |||
1e5192da6d | |||
dee85a49a7 |
@ -1,36 +1,32 @@
|
|||||||
{ stdenv
|
{
|
||||||
, lib
|
lib,
|
||||||
, withCFlags
|
stdenv,
|
||||||
, intelPackages
|
autoconf,
|
||||||
, fetchFromGitHub
|
automake,
|
||||||
, automake
|
autoreconfHook,
|
||||||
, autoconf
|
boost,
|
||||||
, libtool
|
fetchFromGitHub,
|
||||||
, gnumake
|
gnumake,
|
||||||
, autoreconfHook
|
libtool,
|
||||||
, boost
|
withCFlags,
|
||||||
, adaptivecpp ? null
|
|
||||||
, useIntel ? true
|
|
||||||
|
|
||||||
, useGit ? false
|
useIntel ? true,
|
||||||
, gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tasycl/tasycl.git"
|
adaptivecpp ? null,
|
||||||
, gitBranch ? "main"
|
intelPackages ? null,
|
||||||
, gitCommit ? "78f98dcf60a66e0eaa3b4ebcf55be076bec64825"
|
|
||||||
|
useGit ? false,
|
||||||
|
gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tasycl/tasycl.git",
|
||||||
|
gitBranch ? "main",
|
||||||
|
gitCommit ? "78f98dcf60a66e0eaa3b4ebcf55be076bec64825",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (useIntel || adaptivecpp != null);
|
assert !useIntel -> adaptivecpp != null;
|
||||||
|
assert useIntel -> intelPackages != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
variant = if useIntel then "intel" else "acpp";
|
variant = if useIntel then "intel" else "acpp";
|
||||||
|
|
||||||
syclStdenv =
|
syclStdenv = withCFlags [ "-O3" ] (if useIntel then intelPackages.stdenv else stdenv);
|
||||||
if useIntel then
|
|
||||||
# If we don't set optimization level, separateDebugInfo sets ggdb and
|
|
||||||
# intel disables all optimizations
|
|
||||||
withCFlags ["-O3"] intelPackages.stdenv
|
|
||||||
else
|
|
||||||
withCFlags [ "-L${adaptivecpp}/lib" "-lacpp-rt" "-I${adaptivecpp}/include" ] stdenv
|
|
||||||
;
|
|
||||||
|
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "2.1.0";
|
version = "2.1.0";
|
||||||
@ -53,14 +49,10 @@ let
|
|||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
isOldRelease = (!useGit && (builtins.compareVersions source.version "2.0.0" <= 0));
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
assert !isOldRelease || useIntel; # old releases only work with intel
|
|
||||||
|
|
||||||
syclStdenv.mkDerivation {
|
syclStdenv.mkDerivation {
|
||||||
pname = "tasycl";
|
pname = "tasycl-${variant}";
|
||||||
inherit (source) src version;
|
inherit (source) src version;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -78,8 +70,9 @@ syclStdenv.mkDerivation {
|
|||||||
boost
|
boost
|
||||||
];
|
];
|
||||||
|
|
||||||
# only needed for release versions prior or equal to 2.0.0
|
configureFlags = lib.optionals (!useIntel) [
|
||||||
configureFlags = lib.optionals isOldRelease [ "--with-sycl-include=${intelPackages.icx.cc}/include/sycl" ];
|
"CXX=${lib.getExe adaptivecpp}"
|
||||||
|
];
|
||||||
|
|
||||||
# add symlinks so we can explicitly link with tasycl-intel / tasycl-acpp
|
# add symlinks so we can explicitly link with tasycl-intel / tasycl-acpp
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user