mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
ucx: fix the cudaPackages_12 variant; drop the cudatoolkit runfile dependency
This commit is contained in:
parent
ee108108fc
commit
58819d631e
@ -2,18 +2,12 @@
|
|||||||
, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
|
, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
|
||||||
, config
|
, config
|
||||||
, enableCuda ? config.cudaSupport
|
, enableCuda ? config.cudaSupport
|
||||||
, cudatoolkit
|
, cudaPackages
|
||||||
, enableRocm ? config.rocmSupport
|
, enableRocm ? config.rocmSupport
|
||||||
, rocmPackages
|
, rocmPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Needed for configure to find all libraries
|
|
||||||
cudatoolkit' = symlinkJoin {
|
|
||||||
inherit (cudatoolkit) name meta;
|
|
||||||
paths = [ cudatoolkit cudatoolkit.lib ];
|
|
||||||
};
|
|
||||||
|
|
||||||
rocmList = with rocmPackages; [ rocm-core rocm-runtime rocm-device-libs clr ];
|
rocmList = with rocmPackages; [ rocm-core rocm-runtime rocm-device-libs clr ];
|
||||||
|
|
||||||
rocm = symlinkJoin {
|
rocm = symlinkJoin {
|
||||||
@ -35,7 +29,15 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
outputs = [ "out" "doc" "dev" ];
|
outputs = [ "out" "doc" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook doxygen pkg-config ];
|
nativeBuildInputs = [
|
||||||
|
autoreconfHook
|
||||||
|
doxygen
|
||||||
|
pkg-config
|
||||||
|
]
|
||||||
|
++ lib.optionals enableCuda [
|
||||||
|
cudaPackages.cuda_nvcc
|
||||||
|
cudaPackages.autoAddOpenGLRunpathHook
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libbfd
|
libbfd
|
||||||
@ -44,8 +46,16 @@ stdenv.mkDerivation rec {
|
|||||||
perl
|
perl
|
||||||
rdma-core
|
rdma-core
|
||||||
zlib
|
zlib
|
||||||
] ++ lib.optional enableCuda cudatoolkit
|
] ++ lib.optionals enableCuda [
|
||||||
++ lib.optionals enableRocm rocmList;
|
cudaPackages.cuda_cudart
|
||||||
|
cudaPackages.cuda_nvml_dev
|
||||||
|
|
||||||
|
] ++ lib.optionals enableRocm rocmList;
|
||||||
|
|
||||||
|
LDFLAGS = lib.optionals enableCuda [
|
||||||
|
# Fake libnvidia-ml.so (the real one is deployed impurely)
|
||||||
|
"-L${cudaPackages.cuda_nvml_dev}/lib/stubs"
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-rdmacm=${lib.getDev rdma-core}"
|
"--with-rdmacm=${lib.getDev rdma-core}"
|
||||||
@ -53,7 +63,7 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-rc"
|
"--with-rc"
|
||||||
"--with-dm"
|
"--with-dm"
|
||||||
"--with-verbs=${lib.getDev rdma-core}"
|
"--with-verbs=${lib.getDev rdma-core}"
|
||||||
] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"
|
] ++ lib.optionals enableCuda [ "--with-cuda=${cudaPackages.cuda_cudart}" ]
|
||||||
++ lib.optional enableRocm "--with-rocm=${rocm}";
|
++ lib.optional enableRocm "--with-rocm=${rocm}";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user