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