onnxruntime: properly condition ncclSupport

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
Connor Baker
2025-08-28 23:17:39 +00:00
parent e64f45158b
commit d70f62973b
2 changed files with 5 additions and 8 deletions
+3 -8
View File
@@ -23,7 +23,7 @@
darwinMinVersionHook,
pythonSupport ? true,
cudaSupport ? config.cudaSupport,
ncclSupport ? config.cudaSupport,
ncclSupport ? cudaSupport && cudaPackages.nccl.meta.available,
withFullProtobuf ? false,
cudaPackages ? { },
}@inputs:
@@ -154,12 +154,7 @@ effectiveStdenv.mkDerivation rec {
cudnn # cudnn.h
cuda_cudart
]
++ lib.optionals (cudaSupport && ncclSupport) (
with cudaPackages;
[
nccl
]
)
++ lib.optionals ncclSupport [ nccl ]
)
++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [
(darwinMinVersionHook "13.3")
@@ -270,7 +265,7 @@ effectiveStdenv.mkDerivation rec {
'';
passthru = {
inherit cudaSupport cudaPackages; # for the python module
inherit cudaSupport cudaPackages ncclSupport; # for the python module
inherit protobuf;
tests = lib.optionalAttrs pythonSupport {
python = python3Packages.onnxruntime;
@@ -68,6 +68,8 @@ buildPythonPackage {
libcufft # libcufft.so.XX
cudnn # libcudnn.soXX
cuda_cudart # libcudart.so.XX
]
++ lib.optionals onnxruntime.passthru.ncclSupport [
nccl # libnccl.so.XX
]
);