[Reland] Use 3.27 as the minimum CMake version (#154783)

Reland of #153153, which was incidentally closed.
Update the minimum CMake version to 3.27 because of it provides more CUDA targets such as CUDA::nvperf_host so that it is possible to remove some of our forked CUDA modules. See https://github.com/pytorch/pytorch/pull/153783.
It's also possible to facilitate future third-party updates such as FBGEMM (its current shipped version requires 3.21).

Pull Request resolved: https://github.com/pytorch/pytorch/pull/154783
Approved by: https://github.com/ezyang
This commit is contained in:
cyy
2025-06-14 16:37:47 +00:00
committed by PyTorch MergeBot
parent 370fc49dde
commit c2beeadeb4
13 changed files with 23 additions and 36 deletions

View File

@ -1,5 +1,5 @@
project(libshm C CXX)
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
cmake_minimum_required(VERSION 3.27 FATAL_ERROR)
set(TORCH_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../)