rccl: init at 2.12.10-5.3.1

This commit is contained in:
Madoura 2022-10-24 08:03:02 -05:00
parent 6901ec11e7
commit 30b66b2bd8
No known key found for this signature in database
GPG key ID: 3201136B3DB072F9
2 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,84 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, rocm-cmake
, rocm-runtime
, rocm-device-libs
, rocm-comgr
, rocm-smi
, hip
, gtest
, chrpath ? null
, buildTests ? false
}:
assert buildTests -> chrpath != null;
stdenv.mkDerivation rec {
pname = "rccl";
rocmVersion = "5.3.1";
version = "2.12.10-${rocmVersion}";
outputs = [
"out"
] ++ lib.optionals buildTests [
"test"
];
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";
repo = "rccl";
rev = "rocm-${rocmVersion}";
hash = "sha256-whRXGD8oINDYhFs8+hEWKWoGNqacGlyy7xi8peA8Qsk=";
};
nativeBuildInputs = [
cmake
rocm-cmake
hip
];
buildInputs = [
rocm-runtime
rocm-device-libs
rocm-comgr
rocm-smi
gtest
] ++ lib.optionals buildTests [
chrpath
];
cmakeFlags = [
"-DCMAKE_C_COMPILER=hipcc"
"-DCMAKE_CXX_COMPILER=hipcc"
# Manually define CMAKE_INSTALL_<DIR>
# See: https://github.com/NixOS/nixpkgs/pull/197838
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
] ++ lib.optionals buildTests [
"-DBUILD_TESTS=ON"
];
# Replace the manually set parallel jobs to NIX_BUILD_CORES
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "8 P" "$NIX_BUILD_CORES P" \
--replace "8)" "$NIX_BUILD_CORES)"
'';
postInstall = lib.optionalString buildTests ''
mkdir -p $test/bin
mv $out/bin/* $test/bin
rmdir $out/bin
'';
meta = with lib; {
description = "ROCm communication collectives library";
homepage = "https://github.com/ROCmSoftwarePlatform/rccl";
license = with licenses; [ bsd2 bsd3 ];
maintainers = with maintainers; [ Madouura ];
broken = rocmVersion != hip.version;
};
}

View file

@ -14853,6 +14853,8 @@ with pkgs;
hipsparse = callPackage ../development/libraries/hipsparse { };
rccl = callPackage ../development/libraries/rccl { };
rocm-cmake = callPackage ../development/tools/build-managers/rocm-cmake { };
rocm-comgr = callPackage ../development/libraries/rocm-comgr {