ucx: 1.13.1 -> 1.14.0 and optional ROCm support

This commit is contained in:
Bruno Bzeznik 2023-03-15 17:57:55 +01:00
parent be915f836e
commit 8f1c68db16

View file

@ -1,7 +1,9 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, doxygen { lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
, numactl, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin , rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
, enableCuda ? false , enableCuda ? false
, cudatoolkit , cudatoolkit
, enableRocm ? false
, rocm-core, rocm-runtime, rocm-device-libs, hip
}: }:
let let
@ -10,29 +12,24 @@ let
inherit (cudatoolkit) name meta; inherit (cudatoolkit) name meta;
paths = [ cudatoolkit cudatoolkit.lib ]; paths = [ cudatoolkit cudatoolkit.lib ];
}; };
rocm = symlinkJoin {
name = "rocm";
paths = [ rocm-core rocm-runtime rocm-device-libs hip ];
};
in stdenv.mkDerivation rec { in
stdenv.mkDerivation rec {
pname = "ucx"; pname = "ucx";
version = "1.13.1"; version = "1.14.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "openucx"; owner = "openucx";
repo = "ucx"; repo = "ucx";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-NhtN8xrHc6UnUrMbq9LHpb25JO+/LDGcLLGebCfGnv4="; sha256 = "sha256-OSYeJfMi57KABt8l3Yj0glqx54C5cwM2FqlijszJIk4=";
}; };
patches = [ nativeBuildInputs = [ autoreconfHook doxygen pkg-config ];
# Pull upstream fix for binutils-2.39:
# https://github.com/openucx/ucx/pull/8450
(fetchpatch {
name = "binutils-2.39.patch";
url = "https://github.com/openucx/ucx/commit/6b6128efd416831cec3a1820f7d1c8e648b79448.patch";
sha256 = "sha256-ci00nZG8iOUEFXbmgr/5XkIfiw4eAAdG1wcEYjQSiT8=";
})
];
nativeBuildInputs = [ autoreconfHook doxygen ];
buildInputs = [ buildInputs = [
libbfd libbfd
@ -41,7 +38,8 @@ in stdenv.mkDerivation rec {
perl perl
rdma-core rdma-core
zlib zlib
] ++ lib.optional enableCuda cudatoolkit; ] ++ lib.optional enableCuda cudatoolkit
++ lib.optional enableRocm [ rocm-core rocm-runtime rocm-device-libs hip ];
configureFlags = [ configureFlags = [
"--with-rdmacm=${rdma-core}" "--with-rdmacm=${rdma-core}"
@ -49,7 +47,8 @@ in stdenv.mkDerivation rec {
"--with-rc" "--with-rc"
"--with-dm" "--with-dm"
"--with-verbs=${rdma-core}" "--with-verbs=${rdma-core}"
] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"; ] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"
++ lib.optional enableRocm "--with-rocm=${rocm}";
enableParallelBuilding = true; enableParallelBuilding = true;