From 8f8205af886c055b95ea0e665a748353e7edd2f4 Mon Sep 17 00:00:00 2001 From: rsanthanam-amd <70280935+rsanthanam-amd@users.noreply.github.com> Date: Mon, 19 Sep 2022 15:02:02 -0500 Subject: [PATCH] NCCL should not be dependent on ROCm builds since RCCL is used instead. (#32461) Allow the nccl flag to be specified even for ROCm builds so that NCCL kernels are included in the build. In this case the NCCL kernels will use RCCL as the backend implementation. --- var/spack/repos/builtin/packages/py-tensorflow/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index d6380bee01..5c6b3dc1ac 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -291,7 +291,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage): depends_on("rocblas") depends_on("rocfft") depends_on("hipfft") - depends_on("rccl") + depends_on("rccl", when="+nccl") depends_on("hipsparse") depends_on("hipcub") depends_on("rocsolver") @@ -348,7 +348,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage): depends_on("cudnn@:6", when="@0.5:0.6 +cuda") depends_on("cudnn@:7", when="@0.7:2.2 +cuda") # depends_on('tensorrt', when='+tensorrt') - depends_on("nccl", when="+nccl") + depends_on("nccl", when="+nccl+cuda") depends_on("mpi", when="+mpi") # depends_on('android-ndk@10:18', when='+android') # depends_on('android-sdk', when='+android') @@ -418,7 +418,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage): msg="Currently TensorRT is only supported on Linux platform", ) conflicts("+nccl", when="@:1.7") - conflicts("+nccl", when="~cuda") + conflicts("+nccl", when="~cuda~rocm") conflicts( "+nccl", when="platform=darwin", msg="Currently NCCL is only supported on Linux platform" )