Skip to content

[CMAKE] Upgrade TVM build baseline to C++20#19734

Open
Ubospica wants to merge 4 commits into
apache:mainfrom
Ubospica:2026-06-11-cxx20-build-baseline
Open

[CMAKE] Upgrade TVM build baseline to C++20#19734
Ubospica wants to merge 4 commits into
apache:mainfrom
Ubospica:2026-06-11-cxx20-build-baseline

Conversation

@Ubospica

@Ubospica Ubospica commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR upgrades TVM's core CMake build baseline from C++17 to C++20.

It updates the top-level CMake C++/CUDA standards and the LLVM compile probe fallback flags. Downstream app, JVM, web, Python helper, and vendored third-party build surfaces are intentionally left unchanged so they can migrate separately.

Verification

  • Configured a minimal local build with GCC 13.3 and NVCC 13.2:
    cmake -S . -B build/cxx20-check -GNinja -DBUILD_TESTING=OFF -DUSE_LLVM=OFF -DUSE_CUDA=OFF -DTVM_BUILD_PYTHON_MODULE=OFF

Move TVM's core C++ and CUDA dialects to C++20 and update first-party helper
build paths that compile TVM-generated C++ code. This keeps the codebase ready
for C++20 native dependencies while leaving vendored third-party projects to
manage their own minimum standards.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

Ubospica added 3 commits June 11, 2026 12:34
Limit the C++20 baseline update to TVM's core CMake configuration and docs.
Leave app, JVM, web, and Python helper compile flags at their existing C++17
settings so those downstream build surfaces can migrate separately.
Replace deprecated C++ traits and make captures explicit so the C++20 baseline builds cleanly under -Werror.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant