-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bugfix][CMake] Update the minimum CMake version to 3.18 #12682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also update the requirements in install/from_source.rst
to match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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.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.