Add TACUDA package
This commit is contained in:
		
							parent
							
								
									44cc60fcd8
								
							
						
					
					
						commit
						dbfebf2b92
					
				| @ -58,6 +58,7 @@ let | ||||
|     tagaspi = callPackage ./pkgs/tagaspi/default.nix { }; | ||||
|     tampi = callPackage ./pkgs/tampi/default.nix { }; | ||||
|     upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { }; | ||||
|     tacuda = callPackage ./pkgs/tacuda/default.nix { }; | ||||
|     wxparaver = callPackage ./pkgs/paraver/default.nix { }; | ||||
|   }; | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										68
									
								
								pkgs/tacuda/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								pkgs/tacuda/default.nix
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,68 @@ | ||||
| { stdenv | ||||
| , fetchFromGitHub | ||||
| , automake | ||||
| , autoconf | ||||
| , libtool | ||||
| , gnumake | ||||
| , autoreconfHook | ||||
| , boost | ||||
| , cudaPackages | ||||
| 
 | ||||
| , useGit ? false | ||||
| , gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git" | ||||
| , gitBranch ? "main" | ||||
| , gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e" | ||||
| }: | ||||
| 
 | ||||
| let | ||||
| 
 | ||||
|   release_ver = "2.1.0"; | ||||
|   release = { | ||||
|     version = release_ver; | ||||
|     src = fetchFromGitHub { | ||||
|       owner = "bsc-pm"; | ||||
|       repo = "tacuda"; | ||||
|       rev = release_ver; | ||||
|       hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM="; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   git = rec { | ||||
|     version = src.shortRev; | ||||
|     src = builtins.fetchGit { | ||||
|       url = gitUrl; | ||||
|       ref = gitBranch; | ||||
|       rev = gitCommit; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   source = if (useGit) then git else release; | ||||
| 
 | ||||
| in | ||||
| 
 | ||||
| stdenv.mkDerivation { | ||||
|   pname = "tacuda"; | ||||
|   inherit (source) src version; | ||||
| 
 | ||||
|   enableParallelBuilding = true; | ||||
|   separateDebugInfo = true; | ||||
| 
 | ||||
|   nativeBuildInputs = [ | ||||
|     autoreconfHook | ||||
|     automake | ||||
|     autoconf | ||||
|     libtool | ||||
|     gnumake | ||||
|   ]; | ||||
| 
 | ||||
|   patches = [ ./fix_config.patch ]; | ||||
| 
 | ||||
|   configureFlags = [ "--with-cuda-include=${cudaPackages.cudatoolkit}/include" ]; | ||||
| 
 | ||||
|   buildInputs = [ | ||||
|     boost | ||||
|     cudaPackages.libcublas | ||||
|     cudaPackages.cuda_cudart | ||||
|   ]; | ||||
| 
 | ||||
| } | ||||
							
								
								
									
										13
									
								
								pkgs/tacuda/fix_config.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								pkgs/tacuda/fix_config.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| diff --git a/m4/cuda.m4 b/m4/cuda.m4
 | ||||
| index 23f5c94..8f9b534 100644
 | ||||
| --- a/m4/cuda.m4
 | ||||
| +++ b/m4/cuda.m4
 | ||||
| @@ -40,7 +40,7 @@ search_libs="cuda cublas cudart"
 | ||||
|  required_libs="" | ||||
|   | ||||
|  m4_foreach([function], | ||||
| -           [cuInit,
 | ||||
| +           [
 | ||||
|  	    cublasSgemm, | ||||
|              cudaStreamCreate, | ||||
|              cudaLaunchKernel, | ||||
		Reference in New Issue
	
	Block a user