You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2024/01/19 14:44:53 UTC
(tvm) branch unity updated: [Unity] downgrade cmake version requirement (#16432)
This is an automated email from the ASF dual-hosted git repository.
tqchen 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 4e754a7803 [Unity] downgrade cmake version requirement (#16432)
4e754a7803 is described below
commit 4e754a7803a3aa1f375071620b73cbb2d7314ae1
Author: Siyuan Feng <Hz...@sjtu.edu.cn>
AuthorDate: Fri Jan 19 22:44:47 2024 +0800
[Unity] downgrade cmake version requirement (#16432)
downgrade cmake version requirement
---
CMakeLists.txt | 2 +-
cmake/modules/CUDA.cmake | 3 +++
tests/scripts/task_config_build_gpu.sh | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7fd92e25a..058f477dbd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.24)
+cmake_minimum_required(VERSION 3.18)
project(tvm C CXX)
# Utility functions
diff --git a/cmake/modules/CUDA.cmake b/cmake/modules/CUDA.cmake
index 6128743283..84f466f591 100644
--- a/cmake/modules/CUDA.cmake
+++ b/cmake/modules/CUDA.cmake
@@ -40,6 +40,9 @@ if(USE_CUDA)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_NVRTC_LIBRARY})
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
+ if(CMAKE_VERSION VERSION_LESS "3.24")
+ message(FATAL_ERROR "CMAKE_CUDA_ARCHITECTURES not set. Please upgrade cmake to 3.24 to use native, or set CMAKE_CUDA_ARCHITECTURES manually")
+ endif()
message(STATUS "CMAKE_CUDA_ARCHITECTURES not set, using native")
set(CMAKE_CUDA_ARCHITECTURES native)
endif()
diff --git a/tests/scripts/task_config_build_gpu.sh b/tests/scripts/task_config_build_gpu.sh
index 37ab0a87f1..e68e646ce1 100755
--- a/tests/scripts/task_config_build_gpu.sh
+++ b/tests/scripts/task_config_build_gpu.sh
@@ -54,3 +54,4 @@ 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