Add TASYCL 2.1.0
This commit is contained in:
		
							parent
							
								
									e1052620a6
								
							
						
					
					
						commit
						ddc7b55e3f
					
				| @ -47,6 +47,8 @@ let | ||||
|     stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; }; | ||||
|     #tagaspi = callPackage ./pkgs/tagaspi/default.nix { }; # Broken due gpi-2 | ||||
|     tampi = callPackage ./pkgs/tampi/default.nix { }; | ||||
|     tasycl = callPackage ./pkgs/tasycl/default.nix { }; | ||||
|     tasycl-acpp = callPackage ./pkgs/tasycl/default.nix { useIntel = false; }; | ||||
|     wxparaver = callPackage ./pkgs/paraver/default.nix { }; | ||||
|   }; | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										94
									
								
								pkgs/tasycl/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								pkgs/tasycl/default.nix
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,94 @@ | ||||
| { stdenv | ||||
| , lib | ||||
| , withCFlags | ||||
| , intelPackages | ||||
| , fetchFromGitHub | ||||
| , automake | ||||
| , autoconf | ||||
| , libtool | ||||
| , gnumake | ||||
| , autoreconfHook | ||||
| , boost | ||||
| , adaptivecpp ? null | ||||
| , useIntel ? true | ||||
| 
 | ||||
| , useGit ? false | ||||
| , gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tasycl/tasycl.git" | ||||
| , gitBranch ? "main" | ||||
| , gitCommit ? "78f98dcf60a66e0eaa3b4ebcf55be076bec64825" | ||||
| }: | ||||
| 
 | ||||
| assert (useIntel || adaptivecpp != 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 | ||||
|   ; | ||||
| 
 | ||||
|   release = rec { | ||||
|     version = "2.1.0"; | ||||
|     src = fetchFromGitHub { | ||||
|       owner = "bsc-pm"; | ||||
|       repo = "tasycl"; | ||||
|       rev = version; | ||||
|       hash = "sha256-0kXnb0lHeQNHR27GTLbJ8xbiICLU8k2+FqEnnFSrzzo="; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   git = rec { | ||||
|     version = src.shortRev; | ||||
|     src = builtins.fetchGit { | ||||
|       url = gitUrl; | ||||
|       ref = gitBranch; | ||||
|       rev = gitCommit; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   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"; | ||||
|   inherit (source) src version; | ||||
| 
 | ||||
|   enableParallelBuilding = true; | ||||
|   separateDebugInfo = true; | ||||
| 
 | ||||
|   nativeBuildInputs = [ | ||||
|     autoreconfHook | ||||
|     automake | ||||
|     autoconf | ||||
|     libtool | ||||
|     gnumake | ||||
|   ]; | ||||
| 
 | ||||
|   buildInputs = [ | ||||
|     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" ]; | ||||
| 
 | ||||
|   # add symlinks so we can explicitly link with tasycl-intel / tasycl-acpp | ||||
|   postInstall = '' | ||||
|     pushd $out/lib | ||||
|     for i in libtasycl* ; do | ||||
|       ln -s "$i" "''\${i/tasycl/tasycl-${variant}}" | ||||
|     done | ||||
|     popd | ||||
|   ''; | ||||
| 
 | ||||
|   hardeningDisable = [ "all" ]; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user