mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
9e0472e206
clang-ocl: 5.4.0 → 5.4.1 hipsparse: 5.4.0 → 5.4.1 composable_kernel: unstable-2022-12-08 → unstable-2022-12-15 llvmPackages_rocm.llvm: 5.4.0 → 5.4.1 miopen: 5.4.0 → 5.4.1 miopengemm: 5.4.0 → 5.4.1 rccl: 5.4.0 → 5.4.1 rocalution: 5.4.0 → 5.4.1 hipcub: 5.4.0 → 5.4.1 rocclr: 5.4.0 → 5.4.1 rocfft: 5.4.0 → 5.4.1 rocm-cmake: 5.4.0 → 5.4.1 rocm-comgr: 5.4.0 → 5.4.1 rocm-device-libs: 5.4.0 → 5.4.1 hip: 5.4.0 → 5.4.1 rocblas: 5.4.0 → 5.4.1 rocm-runtime: 5.4.0 → 5.4.1 rocm-opencl-runtime: 5.4.0 → 5.4.1 rocm-thunk: 5.4.0 → 5.4.1 rocprim: 5.4.0 → 5.4.1 rocm-smi: 5.4.0 → 5.4.1 rocminfo: 5.4.0 → 5.4.1 rocsolver: 5.4.0 → 5.4.1 rocrand: 5.4.0 → 5.4.1 rocthrust: 5.4.0 → 5.4.1 rocprofiler: 5.4.0 → 5.4.1 rocwmma: 5.4.0 → 5.4.1 roctracer: 5.4.0 → 5.4.1 rocsparse: 5.4.0 → 5.4.1 tensile: 5.4.0 → 5.4.1
83 lines
1.7 KiB
Nix
83 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rocmUpdateScript
|
|
, cmake
|
|
, rocm-cmake
|
|
, rocm-smi
|
|
, hip
|
|
, gtest
|
|
, chrpath
|
|
, buildTests ? false
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "rccl";
|
|
version = "5.4.1";
|
|
|
|
outputs = [
|
|
"out"
|
|
] ++ lib.optionals buildTests [
|
|
"test"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ROCmSoftwarePlatform";
|
|
repo = "rccl";
|
|
rev = "rocm-${finalAttrs.version}";
|
|
hash = "sha256-y9gTGk8LyX7owb2xdtb6VlnIXu/CYHOjnNa/wrNl02g=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
rocm-cmake
|
|
hip
|
|
];
|
|
|
|
buildInputs = [
|
|
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
|
|
'';
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
name = finalAttrs.pname;
|
|
owner = finalAttrs.src.owner;
|
|
repo = finalAttrs.src.repo;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "ROCm communication collectives library";
|
|
homepage = "https://github.com/ROCmSoftwarePlatform/rccl";
|
|
license = with licenses; [ bsd2 bsd3 ];
|
|
maintainers = teams.rocm.members;
|
|
broken = finalAttrs.version != hip.version;
|
|
};
|
|
})
|