2023-03-24 00:07:29 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
|
|
|
|
, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
|
2023-08-04 22:07:22 +00:00
|
|
|
, config
|
|
|
|
, enableCuda ? config.cudaSupport
|
2021-12-06 16:07:01 +00:00
|
|
|
, cudatoolkit
|
2023-03-24 00:07:29 +00:00
|
|
|
, enableRocm ? false
|
|
|
|
, rocm-core, rocm-runtime, rocm-device-libs, hip
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
let
|
|
|
|
# Needed for configure to find all libraries
|
|
|
|
cudatoolkit' = symlinkJoin {
|
|
|
|
inherit (cudatoolkit) name meta;
|
|
|
|
paths = [ cudatoolkit cudatoolkit.lib ];
|
|
|
|
};
|
2023-03-24 00:07:29 +00:00
|
|
|
rocm = symlinkJoin {
|
|
|
|
name = "rocm";
|
|
|
|
paths = [ rocm-core rocm-runtime rocm-device-libs hip ];
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "ucx";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.14.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openucx";
|
|
|
|
repo = "ucx";
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-oAigiCgbr27pX+kNl+RW1P10TKYFSKrHDK4U4z8WMko=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook doxygen pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbfd
|
|
|
|
libiberty
|
|
|
|
numactl
|
|
|
|
perl
|
|
|
|
rdma-core
|
|
|
|
zlib
|
2023-03-24 00:07:29 +00:00
|
|
|
] ++ lib.optional enableCuda cudatoolkit
|
2023-04-29 16:46:19 +00:00
|
|
|
++ lib.optionals enableRocm [ rocm-core rocm-runtime rocm-device-libs hip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-rdmacm=${rdma-core}"
|
|
|
|
"--with-dc"
|
|
|
|
"--with-rc"
|
|
|
|
"--with-dm"
|
|
|
|
"--with-verbs=${rdma-core}"
|
2023-03-24 00:07:29 +00:00
|
|
|
] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"
|
|
|
|
++ lib.optional enableRocm "--with-rocm=${rocm}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unified Communication X library";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://www.openucx.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
|
|
|
};
|
|
|
|
}
|