mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
nccl: 1.2.4-1 -> 2.1.4
It's closed source now.
This commit is contained in:
parent
e77d2106bf
commit
41abde91ce
@ -1,41 +1,24 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, gcc5, eject, cudatoolkit
|
||||
}:
|
||||
{ callPackage, cudatoolkit8, cudatoolkit9 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${cudatoolkit.majorVersion}-nccl-${version}";
|
||||
version = "1.3.4-1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NVIDIA";
|
||||
repo = "nccl";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fvnrfn572lc6i2a3xyhbifm53ivcrr46z6cqr3b0bwb1iq79m7q";
|
||||
let
|
||||
generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) {
|
||||
inherit (args) cudatoolkit;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gcc5
|
||||
eject
|
||||
];
|
||||
in
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cudatoolkit
|
||||
];
|
||||
{
|
||||
nccl_cudatoolkit8 = generic rec {
|
||||
version = "2.1.4";
|
||||
cudatoolkit = cudatoolkit8;
|
||||
srcName = "nccl_${version}-1+cuda${cudatoolkit.majorVersion}_x86_64.txz";
|
||||
sha256 = "1lwwm8kdhna5m318yg304kl2gsz1jwhv4zv4gn8av2m57zh848zi";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"CUDA_HOME=${cudatoolkit}"
|
||||
"CUDA_LIB=${cudatoolkit.lib}/lib"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = ''
|
||||
NVIDIA Collective Communications Library.
|
||||
Multi-GPU and multi-node collective communication primitives.
|
||||
'';
|
||||
homepage = https://developer.nvidia.com/nccl;
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ hyphon81 ];
|
||||
nccl_cudatoolkit9 = generic rec {
|
||||
version = "2.1.4";
|
||||
cudatoolkit = cudatoolkit9;
|
||||
srcName = "nccl_${version}-1+cuda${cudatoolkit.majorVersion}_x86_64.txz";
|
||||
sha256 = "0pajmqzkacpszs63jh2hw2qqc49kj75kcf7r0ky8hdh560q8xn0p";
|
||||
};
|
||||
}
|
||||
|
57
pkgs/development/libraries/science/math/nccl/generic.nix
Normal file
57
pkgs/development/libraries/science/math/nccl/generic.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{ version
|
||||
, srcName
|
||||
, sha256
|
||||
}:
|
||||
|
||||
{ stdenv
|
||||
, lib
|
||||
, requireFile
|
||||
, cudatoolkit
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${cudatoolkit.majorVersion}-nccl-${version}";
|
||||
|
||||
inherit version;
|
||||
|
||||
src = requireFile rec {
|
||||
name = srcName;
|
||||
inherit sha256;
|
||||
message = ''
|
||||
This nix expression requires that ${name} is already part of the store.
|
||||
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the NCCL library
|
||||
at https://developer.nvidia.com/nccl, and run the following command in the download directory:
|
||||
nix-prefetch-url file://${name}
|
||||
'';
|
||||
};
|
||||
|
||||
unpackCmd = "tar xJf $src";
|
||||
|
||||
installPhase = ''
|
||||
function fixRunPath {
|
||||
p=$(patchelf --print-rpath $1)
|
||||
patchelf --set-rpath "$p:${lib.makeLibraryPath [ stdenv.cc.cc ]}" $1
|
||||
}
|
||||
fixRunPath lib/libnccl.so
|
||||
|
||||
mkdir -p $out
|
||||
cp -a include $out/include
|
||||
cp -a lib $out/lib
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cudatoolkit
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit cudatoolkit;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Multi-GPU and multi-node collective communication primitives that are performance optimized for NVIDIA GPUs";
|
||||
homepage = https://developer.nvidia.com/nccl;
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ mdaiter ];
|
||||
};
|
||||
}
|
@ -3704,9 +3704,11 @@ with pkgs;
|
||||
|
||||
nbd = callPackage ../tools/networking/nbd { };
|
||||
|
||||
nccl = callPackage ../development/libraries/science/math/nccl {
|
||||
cudatoolkit = cudatoolkit8;
|
||||
};
|
||||
inherit (callPackages ../development/libraries/science/math/nccl { })
|
||||
nccl_cudatoolkit8
|
||||
nccl_cudatoolkit9;
|
||||
|
||||
nccl = nccl_cudatoolkit9;
|
||||
|
||||
ndjbdns = callPackage ../tools/networking/ndjbdns { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user