From 9edcaf0e17458afbbd6a9f26a41ae6d367799305 Mon Sep 17 00:00:00 2001 From: Tim Moon <4406448+timmoon10@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:13:38 -0700 Subject: [PATCH] Update minimum CMake version (#1037) * Set minimum CMake version to 3.21 Stop linking to nvtx. Signed-off-by: Tim Moon * Update .github/workflows/build.yml Co-authored-by: Kirthi Shankar Sivamani Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com> * Revert Python version to 3.9 Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com> --------- Signed-off-by: Tim Moon Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com> Co-authored-by: Kirthi Shankar Sivamani --- .github/workflows/build.yml | 3 ++- setup.py | 2 +- transformer_engine/common/CMakeLists.txt | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8df4b5179e..acec20b566 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,8 @@ jobs: - name: 'Dependencies' run: | apt-get update - apt-get install -y git python3.9 pip cmake ninja-build cudnn9-cuda-12 + apt-get install -y git python3.9 pip ninja-build cudnn9-cuda-12 + pip install cmake==3.21.0 - name: 'Checkout' uses: actions/checkout@v3 with: diff --git a/setup.py b/setup.py index d2cc91d65a..41521418ba 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def setup_requirements() -> Tuple[List[str], List[str], List[str]]: # Requirements that may be installed outside of Python if not found_cmake(): - setup_reqs.append("cmake>=3.18") + setup_reqs.append("cmake>=3.21") if not found_ninja(): setup_reqs.append("ninja") if not found_pybind11(): diff --git a/transformer_engine/common/CMakeLists.txt b/transformer_engine/common/CMakeLists.txt index 0cf48f37f2..e22e8dbbc8 100644 --- a/transformer_engine/common/CMakeLists.txt +++ b/transformer_engine/common/CMakeLists.txt @@ -2,7 +2,7 @@ # # See LICENSE for license information. -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.21) if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) set(CMAKE_CUDA_ARCHITECTURES 70 80 89 90) @@ -18,7 +18,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_CUDA_FLAGS_DEBUG "${CMAKE_CUDA_FLAGS_DEBUG} -G") endif() -find_package(CUDAToolkit REQUIRED cublas nvToolsExt) +find_package(CUDAToolkit REQUIRED) # Check for cuDNN frontend API set(CUDNN_FRONTEND_INCLUDE_DIR @@ -79,7 +79,6 @@ target_link_libraries(transformer_engine PUBLIC CUDA::cuda_driver CUDA::cudart CUDA::nvrtc - CUDA::nvToolsExt CUDNN::cudnn) target_include_directories(transformer_engine PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})