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 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
autoconf,
|
||||
automake,
|
||||
autoreconfHook,
|
||||
boost,
|
||||
fetchFromGitHub,
|
||||
gnumake,
|
||||
libtool,
|
||||
withCFlags,
|
||||
{ stdenv
|
||||
, lib
|
||||
, withCFlags
|
||||
, intelPackages
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, gnumake
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, adaptivecpp ? null
|
||||
, useIntel ? true
|
||||
|
||||
useIntel ? true,
|
||||
adaptivecpp ? null,
|
||||
intelPackages ? null,
|
||||
|
||||
useGit ? false,
|
||||
gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tasycl/tasycl.git",
|
||||
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 -> intelPackages != null;
|
||||
assert (useIntel || adaptivecpp != null);
|
||||
|
||||
let
|
||||
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 {
|
||||
version = "2.1.0";
|
||||
@ -49,10 +53,14 @@ let
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
isOldRelease = (!useGit && (builtins.compareVersions source.version "2.0.0" <= 0));
|
||||
|
||||
in
|
||||
|
||||
assert !isOldRelease || useIntel; # old releases only work with intel
|
||||
|
||||
syclStdenv.mkDerivation {
|
||||
pname = "tasycl-${variant}";
|
||||
pname = "tasycl";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -70,9 +78,8 @@ syclStdenv.mkDerivation {
|
||||
boost
|
||||
];
|
||||
|
||||
configureFlags = lib.optionals (!useIntel) [
|
||||
"CXX=${lib.getExe adaptivecpp}"
|
||||
];
|
||||
# only needed for release versions prior or equal to 2.0.0
|
||||
configureFlags = lib.optionals isOldRelease [ "--with-sycl-include=${intelPackages.icx.cc}/include/sycl" ];
|
||||
|
||||
# add symlinks so we can explicitly link with tasycl-intel / tasycl-acpp
|
||||
postInstall = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user