[Bugfix][CMake] Update the minimum CMake version to 3.18#12682
[Bugfix][CMake] Update the minimum CMake version to 3.18#12682driazati merged 2 commits intoapache:mainfrom
Conversation
driazati
left a comment
There was a problem hiding this comment.
the cmake docs agree https://cmake.org/cmake/help/latest/prop_tgt/CUDA_STANDARD.html
| @@ -1,4 +1,4 @@ | |||
| cmake_minimum_required(VERSION 3.2) | |||
| cmake_minimum_required(VERSION 3.18) | |||
There was a problem hiding this comment.
can you also update the requirements in install/from_source.rst to match?
There was a problem hiding this comment.
Will do, thanks
|
Interesting, it looks like the CI's CMake version is below 3.18. Is it not using C++17? |
|
Likely nvcc is not used in the CI |
|
Should the version check be conditional, then? I am not especially familiar with CMake but I imagine it's probably possible. I am a little confused as to how the CI passes with lower versions of CMake while I had a fresh setup that failed, unless it's not using C++17 |
|
I don't have much idea how to do such a check if we want to condition whether or not NVCC is used, but it seems possible if we want to warn globally no matter if nvcc is used |
|
shall we also update https://github.com/apache/tvm/blob/main/docker/install/ubuntu_install_cmake_source.sh? |
There was a problem hiding this comment.
@slyubomirsky FYI, in #12131 I'm updating the version we build CMake from source to be compliant with what's being proposed here... 3.18.4 exactly. (cc @driazati)
|
Glad to hear the CI's CMake will be updated. I'll also update the install script. |
|
Ah, I see the last change overlaps with @leandron's PR |
|
looks like some issues with the CI, but retriggering as they may be unrelated. |
|
Is the CI using a higher version of CMake? If not, I think the errors will continue 😅 |
|
#12131 just merged, we have to update the Docker images to include that before this PR can pass CI |
|
Per this PR, should I make the minimum version higher? |
e54c718 to
ad0ee82
Compare
|
@driazati when do we expect there to be an update? |
|
some of the images were updated to use 3.18 but not all of them, #12774 should clean up the rest so once that is merged and updated on the images this PR should work |
|
@tvm-bot rerun |
|
Hm, some of the builds still use different versions of CMake. Any pointers on where the CMake versions for those are defined? I would be glad to make the changes myself. |
|
Sorry for the delay, #12906 included a Docker image tag update so they should all be on cmake 3.18+ plus now, a rebase on |
ad0ee82 to
1c3f9f0
Compare
|
Thanks for the reply. Rebasing as advised |
TVM has recently switched to C++17. CUDA support with C++17 requires CMake past version 3.18, according to vinx13. However, the current CMake version check in `CMakeLists.txt` is not checking for a sufficiently high CMake version; this PR updates it. Bug that prompted this: When building with CMake version 3.16 I had the following error: `CUDA_STANDARD is set to invalid value '17'`. Upgrading to the latest CMake (3.24) fixed it.
TVM has recently switched to C++17. CUDA support with C++17 requires CMake past version 3.18, according to @vinx13. However, the current CMake version check in
CMakeLists.txtis not checking for a sufficiently high CMake version; this PR updates it.Bug that prompted this: When building with CMake version 3.16 I had the following error:
CUDA_STANDARD is set to invalid value '17'. Upgrading to the latest CMake (3.24) fixed it.