Compare commits
12 Commits
5be04c5ff5
...
5448fc75e1
Author | SHA1 | Date | |
---|---|---|---|
5448fc75e1 | |||
db058d6b4a | |||
ac93781cbd | |||
312a54526c | |||
d464e30e13 | |||
acc76acc16 | |||
94276875c4 | |||
cd0dd65455 | |||
08ca2ed5bf | |||
75567ed725 | |||
cc7f7c0e8c | |||
f5451b3b91 |
@ -1,32 +1,36 @@
|
|||||||
{
|
{ stdenv
|
||||||
lib,
|
, lib
|
||||||
stdenv,
|
, withCFlags
|
||||||
autoconf,
|
, intelPackages
|
||||||
automake,
|
, fetchFromGitHub
|
||||||
autoreconfHook,
|
, automake
|
||||||
boost,
|
, autoconf
|
||||||
fetchFromGitHub,
|
, libtool
|
||||||
gnumake,
|
, gnumake
|
||||||
libtool,
|
, autoreconfHook
|
||||||
withCFlags,
|
, boost
|
||||||
|
, adaptivecpp ? null
|
||||||
|
, useIntel ? true
|
||||||
|
|
||||||
useIntel ? true,
|
, useGit ? false
|
||||||
adaptivecpp ? null,
|
, gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tasycl/tasycl.git"
|
||||||
intelPackages ? null,
|
, gitBranch ? "main"
|
||||||
|
, 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 = withCFlags [ "-O3" ] (if useIntel then intelPackages.stdenv else stdenv);
|
syclStdenv =
|
||||||
|
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";
|
||||||
@ -49,10 +53,14 @@ 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-${variant}";
|
pname = "tasycl";
|
||||||
inherit (source) src version;
|
inherit (source) src version;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -70,9 +78,8 @@ syclStdenv.mkDerivation {
|
|||||||
boost
|
boost
|
||||||
];
|
];
|
||||||
|
|
||||||
configureFlags = lib.optionals (!useIntel) [
|
# only needed for release versions prior or equal to 2.0.0
|
||||||
"CXX=${lib.getExe adaptivecpp}"
|
configureFlags = lib.optionals isOldRelease [ "--with-sycl-include=${intelPackages.icx.cc}/include/sycl" ];
|
||||||
];
|
|
||||||
|
|
||||||
# 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