From 41172d7894db28349baa447c10fa17ea825ff5b8 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Tue, 4 Jul 2023 20:59:14 +0800 Subject: [PATCH] set cmake_cuda_architecuture (#55098) * set cmake_cuda_architecuture * set cmake_cuda_architecutres * set cmake_cuda_architecutres --- CMakeLists.txt | 3 --- cmake/cuda.cmake | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4ecc664cab..7c7ed763c2f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,9 +24,6 @@ endif() # https://cmake.org/cmake/help/v3.0/policy/CMP0026.html?highlight=cmp0026 cmake_policy(SET CMP0026 OLD) cmake_policy(SET CMP0079 NEW) -if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18) - cmake_policy(SET CMP0104 OLD) -endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(PADDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(PADDLE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake index cfe3339e855..cc28161c24d 100644 --- a/cmake/cuda.cmake +++ b/cmake/cuda.cmake @@ -2,6 +2,9 @@ if(NOT WITH_GPU) return() endif() +#(risemeup1) note: CMake 3.18 needs to specify the value of CMAKE_CUDA_ARCHITECTURES,otherwise a large number of warnings may appear in cmake +set(CMAKE_CUDA_ARCHITECTURES OFF) + if(WITH_NV_JETSON) add_definitions(-DWITH_NV_JETSON) set(paddle_known_gpu_archs "53 62 72") -- GitLab