This is an automated email from the ASF dual-hosted git repository.
junrushao pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new 474c06b8b3 [Unity] Set CMAKE_CUDA_ARCHITECTURES default to native
(#16335)
474c06b8b3 is described below
commit 474c06b8b3e9c0f751a69a7aaf718af156edcd32
Author: Wuwei Lin <[email protected]>
AuthorDate: Wed Jan 10 15:01:43 2024 -0800
[Unity] Set CMAKE_CUDA_ARCHITECTURES default to native (#16335)
CI images should also be updated to install cmake 3.24
---
3rdparty/cutlass_fpA_intB_gemm | 2 +-
CMakeLists.txt | 2 +-
cmake/modules/CUDA.cmake | 25 ++++---------------------
tests/scripts/task_config_build_gpu.sh | 1 -
4 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/3rdparty/cutlass_fpA_intB_gemm b/3rdparty/cutlass_fpA_intB_gemm
index 1243f910a4..12e0cc70d7 160000
--- a/3rdparty/cutlass_fpA_intB_gemm
+++ b/3rdparty/cutlass_fpA_intB_gemm
@@ -1 +1 @@
-Subproject commit 1243f910a4afd49b7983c087e4f610b81e45f71c
+Subproject commit 12e0cc70d7e5c6baeb5fa7e41406e4a08e32e1e6
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 058f477dbd..f7fd92e25a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.18)
+cmake_minimum_required(VERSION 3.24)
project(tvm C CXX)
# Utility functions
diff --git a/cmake/modules/CUDA.cmake b/cmake/modules/CUDA.cmake
index 03a79326c8..1284f85bec 100644
--- a/cmake/modules/CUDA.cmake
+++ b/cmake/modules/CUDA.cmake
@@ -38,27 +38,10 @@ if(USE_CUDA)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUDA_LIBRARY})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_NVRTC_LIBRARY})
- # Compatibility with cmake 3.18+
- #
- # The updates to the cutlass kernels made in TVM PR#16244 require
- # symbols provided in cuda 7.5+. While the cuda architecture is
- # specified by setting `NVCC_FLAGS` in the `CMakeLists.txt` for each
- # kernel, cmake 3.18+ also sets it based on the
- # `CMAKE_CUDA_ARCHITECTURES` value. If not set, cmake will explicitly
- # pass the compute capability as nvidia's default of 5.2, *EVEN IF* it
- # has already been specified in `NVCC_FLAGS`. Because the kernels
- # cannot compile with compute capability of 5.2, this causes
- # compilation errors.
- #
- # By setting `CMAKE_CUDA_ARCHITECTURES` to `OFF`, cmake does not add
- # 5.2 as a target architecture.
- #
- # See https://cmake.org/cmake/help/latest/policy/CMP0104.html for
- # details on CMake's policy for CUDA architecture flags.
- #
- # See https://cmake.org/cmake/help/latest/policy/CMP0104.html for the
- # default CUDA architecture for each version of CUDA.
- set(CMAKE_CUDA_ARCHITECTURES OFF)
+ if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
+ message(STATUS "CMAKE_CUDA_ARCHITECTURES not set, using native")
+ set(CMAKE_CUDA_ARCHITECTURES native)
+ endif()
if(USE_CUDNN)
message(STATUS "Build with cuDNN support")
diff --git a/tests/scripts/task_config_build_gpu.sh
b/tests/scripts/task_config_build_gpu.sh
index e68e646ce1..37ab0a87f1 100755
--- a/tests/scripts/task_config_build_gpu.sh
+++ b/tests/scripts/task_config_build_gpu.sh
@@ -54,4 +54,3 @@ echo set\(USE_PIPELINE_EXECUTOR ON\) >> config.cmake
echo set\(USE_CUTLASS ON\) >> config.cmake
echo set\(USE_CMSISNN ON\) >> config.cmake
echo set\(USE_MSC ON\) >> config.cmake
-echo set\(CMAKE_CUDA_ARCHITECTURES 75\) >> config.cmake