diff --git a/CMakeLists.txt b/CMakeLists.txt index fff6d7aa6c..0cbad9aa11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,7 +305,7 @@ if (HAVE_PARALLEL_JOBS) endif() ## Disable building MSCCL++ if the build environment is invalid -## Currently MSCCL++ is supported only on gfx942 +## Currently MSCCL++ is supported only on gfx942, and only on Ubuntu and CentOS if (ENABLE_MSCCLPP AND NOT ("gfx942" IN_LIST COMPILING_TARGETS OR "gfx942:xnack-" IN_LIST COMPILING_TARGETS OR "gfx942:xnack+" IN_LIST COMPILING_TARGETS)) set(ENABLE_MSCCLPP OFF) message(WARNING "Can only build MSCCL++ for gfx942; disabling MSCCL++ build") @@ -314,6 +314,11 @@ if (ENABLE_MSCCLPP AND ROCM_VERSION VERSION_LESS "60200") set(ENABLE_MSCCLPP OFF) message(WARNING "MSCCL++ integration only supported on ROCm 6.2 or greater; disabling MSCCL++ build") endif() +cmake_host_system_information(RESULT HOST_OS_ID QUERY DISTRIB_ID) +if (ENABLE_MSCCLPP AND NOT(${HOST_OS_ID} STREQUAL "ubuntu" OR ${HOST_OS_ID} STREQUAL "centos")) + set(ENABLE_MSCCLPP OFF) + message(WARNING "MSCCL++ integration not supported on this OS (${HOST_OS_ID}); disabling MSCCL++ build") +endif() # Determine version from makefiles/version.mk and fill in templates #==================================================================================================