This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 168819f5c2 [Docs][CI] Switch docs theme and bump images to
20260619-214849-4174cdf5 (#19828)
168819f5c2 is described below
commit 168819f5c26af1beca9938d4fa60c219eedbd302
Author: Shushi Hong <[email protected]>
AuthorDate: Mon Jun 22 20:10:21 2026 -0400
[Docs][CI] Switch docs theme and bump images to 20260619-214849-4174cdf5
(#19828)
This pr migrates the documentation site from sphinx_rtd_theme to
sphinx-book-theme (pydata-sphinx-theme based).
docs/conf.py:
- html_theme = "sphinx_book_theme"; drop the dead TVM_THEME/READTHEDOCS
indirection that always resolved to sphinx_rtd_theme.
- Replace the RTD-only html_theme_options ({"logo_only": True}) with
book-theme options: repository_url/branch + path_to_docs driving the
repository/edit/source/issue buttons, GitHub + TVM-home icon_links, and
an extra_footer with the Community/Download/Docs links, ASF dropdown,
and Apache trademark notice (the copyright line is rendered natively by
the theme, not duplicated).
- Remove the tlcpack_sphinx_addon import and its
templates_path/html_static_path injection, plus the now-unused
html_context header/footer machinery and fixup_tutorials.
- sphinx_gallery_conf["show_signature"] = False to drop the "Gallery
generated by Sphinx-Gallery" line.
- Remove the dead docs/_static/css/tvm_theme.css (RTD-only selectors,
never linked).
CI enablement folded into this PR:
- ci/jenkins/docker-images.ini bumps CI images to
20260619-214849-4174cdf5, built from #19835's docs dependency change
(sphinx-book-theme==1.1.4 + pydata-sphinx-theme==0.15.4, without
tlcpack-sphinx-addon).
- CMakeLists.txt and pyproject.toml temporarily set USE_Z3=OFF by
default to avoid the current z3-static link failure in CI.
tests/scripts/ci.py and docs/README.md are reconciled to the ci-gpu docs
stack: Sphinx 8.1.3, sphinx-book-theme==1.1.4,
pydata-sphinx-theme==0.15.4, and matching docs packages.
Preserved in the footer: ASF dropdown, Community/Download/Docs links,
copyright, and Apache trademark notice. Intentionally dropped (no
book-theme equivalent): the branded top nav bar, the version_prefixes
dropdown (which did not render on the deployed site), and the tlcpack
search-summary snippet. sphinx-gallery's own sg_gallery.css is
unaffected, so tutorial thumbnail grids still render.
---
CMakeLists.txt | 2 +-
ci/jenkins/docker-images.ini | 2 +-
docs/README.md | 2 +-
docs/_static/css/tvm_theme.css | 43 ---------
docs/conf.py | 196 ++++++++++++++++++++---------------------
pyproject.toml | 6 +-
tests/scripts/ci.py | 18 ++--
7 files changed, 112 insertions(+), 157 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 567edc1dc6..3d183253b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,7 +89,7 @@ tvm_option(COMPILER_RT_PATH "Path to COMPILER-RT"
"3rdparty/compiler-rt")
# Contrib library options
tvm_option(USE_BLAS "The blas library to be linked" none)
tvm_option(USE_AMX "Enable Intel AMX" OFF)
-tvm_option(USE_Z3 "Build with Z3 SMT solver support" AUTO)
+tvm_option(USE_Z3 "Build with Z3 SMT solver support" OFF)
tvm_option(USE_MKL "MKL root path when use MKL blas" OFF)
tvm_option(USE_DNNL "Enable DNNL codegen" OFF)
tvm_option(USE_CUDNN "Build with cuDNN" OFF)
diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini
index 13f8d841cf..afd1c275cb 100644
--- a/ci/jenkins/docker-images.ini
+++ b/ci/jenkins/docker-images.ini
@@ -17,7 +17,7 @@
# This data file is read during when Jenkins runs job to determine docker
images.
[jenkins]
-ci_tag: 20260301-134651-63f099ad
+ci_tag: 20260619-214849-4174cdf5
ci_arm: tlcpack/ci-arm:%(ci_tag)s
ci_cpu: tlcpack/ci-cpu:%(ci_tag)s
ci_gpu: tlcpack/ci-gpu:%(ci_tag)s
diff --git a/docs/README.md b/docs/README.md
index b3b4ce9272..44621b4e07 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -59,7 +59,7 @@ This folder contains the source of TVM's documentation,
hosted at https://tvm.ap
```bash
# Pillow on Ubuntu may require libjpeg-dev from apt
./docker/bash.sh ci_gpu -c \
- 'python3 -m pip install --quiet tlcpack-sphinx-addon==0.2.1 && python3
-m pip freeze' > frozen-requirements.txt
+ 'python3 -m pip install --quiet sphinx-book-theme==1.1.4 && python3 -m
pip freeze' > frozen-requirements.txt
pip install -r frozen-requirements.txt
```
diff --git a/docs/_static/css/tvm_theme.css b/docs/_static/css/tvm_theme.css
deleted file mode 100644
index 93f4ea4d38..0000000000
--- a/docs/_static/css/tvm_theme.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-.rst-content .hidden-section {
- display: none;
-}
-
-.rst-toc .hidden-section {
- display: none;
-}
-
-nav .hidden-section {
- display: inherit;
-}
-
-.wy-side-nav-search {
- background-color: #fff;
- color: #333;
-}
-
-.version{
- color: #404040 !important;
-}
-
-.wy-nav-content {
- max-width: 950px !important;
-}
diff --git a/docs/conf.py b/docs/conf.py
index 9fa136c0b6..8a1bd4fc4e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -353,27 +353,112 @@ todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
-# The theme is set by the make target
-html_theme = os.environ.get("TVM_THEME", "rtd")
+html_theme = "sphinx_book_theme"
-on_rtd = os.environ.get("READTHEDOCS", None) == "True"
-# only import rtd theme and set it if want to build docs locally
-if not on_rtd and html_theme == "rtd":
- html_theme = "sphinx_rtd_theme"
+html_title = "Apache TVM"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
-html_theme_options = {
- "logo_only": True,
-}
-
html_logo = "_static/img/tvm-logo-small.png"
html_favicon = "_static/img/tvm-logo-square.png"
+# The Apache trademark/copyright footer is rendered through sphinx-book-theme's
+# ``extra_footer`` hook (see footer_html below). This mirrors how the tvm-ffi
docs
+# (3rdparty/tvm-ffi/docs/conf.py) preserve the ASF menu under the book theme.
+footer_dropdown = {
+ "name": "ASF",
+ "items": [
+ ("Apache Homepage", "https://apache.org/"),
+ ("License", "https://www.apache.org/licenses/"),
+ ("Sponsorship", "https://www.apache.org/foundation/sponsorship.html"),
+ ("Security", "https://tvm.apache.org/docs/reference/security.html"),
+ ("Thanks", "https://www.apache.org/foundation/thanks.html"),
+ ("Events", "https://www.apache.org/events/current-event"),
+ ],
+}
+
+footer_links = [
+ ("Community", "https://tvm.apache.org/community"),
+ ("Download", "https://tvm.apache.org/download"),
+ ("Docs", "https://tvm.apache.org/docs"),
+]
+
+footer_note = " ".join(
+ """
+Copyright © 2026 The Apache Software Foundation. Apache TVM, Apache, the
Apache feather,
+and the Apache TVM project logo are either trademarks or registered trademarks
of
+the Apache Software Foundation.""".split("\n")
+).strip()
+
+
+def footer_html() -> str:
+ """Build the extra footer: nav links, ASF dropdown, and the Apache
trademark note.
+
+ The copyright line is rendered natively by sphinx-book-theme (from the
``copyright``
+ config value), so it is intentionally not repeated here.
+ """
+ dropdown_items = ""
+ for item_name, item_url in footer_dropdown["items"]:
+ dropdown_items += f'<li><a class="dropdown-item" href="{item_url}"
target="_blank" style="font-size: 0.9em;">{item_name}</a></li>\n'
+
+ nav_links = " · ".join(
+ f'<a href="{url}" style="color: #6c757d; text-decoration:
none;">{name}</a>'
+ for name, url in footer_links
+ )
+
+ return f"""
+ <div class="footer-container" style="margin: 5px 0; font-size: 0.9em; color:
#6c757d;">
+ <div class="footer-line1" style="display: flex; justify-content: center;
align-items: center; gap: 0.9em; margin-bottom: 3px;">
+ <span class="footer-links">{nav_links}</span>
+ <div class="footer-dropdown">
+ <div class="dropdown">
+ <button class="btn btn-link dropdown-toggle" type="button"
id="footerDropdown" data-bs-toggle="dropdown"
+ aria-expanded="false" style="font-size: 0.9em; color:
#6c757d; text-decoration: none; padding: 0; border: none; background: none;">
+ {footer_dropdown["name"]}
+ </button>
+ <ul class="dropdown-menu" aria-labelledby="footerDropdown"
style="font-size: 0.9em;">
+{dropdown_items} </ul>
+ </div>
+ </div>
+ </div>
+ <div class="footer-line2" style="font-size: 0.9em; color: #6c757d;
text-align: center;">
+ {footer_note}
+ </div>
+ </div>
+ """
+
+
+html_theme_options = {
+ "repository_url": "https://github.com/apache/tvm",
+ "repository_branch": "main",
+ "path_to_docs": "docs/",
+ "use_repository_button": True,
+ "use_edit_page_button": True,
+ "use_source_button": True,
+ "use_issues_button": True,
+ "show_toc_level": 2,
+ "show_navbar_depth": 1,
+ "icon_links": [
+ {
+ "name": "GitHub",
+ "url": "https://github.com/apache/tvm",
+ "icon": "fa-brands fa-github",
+ "type": "fontawesome",
+ },
+ {
+ "name": "TVM Homepage",
+ "url": "https://tvm.apache.org/",
+ "icon": "fa-solid fa-house",
+ "type": "fontawesome",
+ },
+ ],
+ "extra_footer": footer_html(),
+}
+
# Output file base name for HTML help builder.
htmlhelp_basename = project + "doc"
@@ -463,6 +548,8 @@ sphinx_gallery_conf = {
"expected_failing_examples": [],
"reset_modules": ("matplotlib", "seaborn", force_gc, install_request_hook),
"promote_jupyter_magic": True,
+ # Drop the "Gallery generated by Sphinx-Gallery" signature line on
generated pages.
+ "show_signature": False,
}
autodoc_default_options = {
@@ -476,95 +563,6 @@ tvm_alias_check_map = {
"tvm.tirx": ["tvm.ir", "tvm.runtime"],
}
-## Setup header and other configs
-import tlcpack_sphinx_addon
-
-footer_copyright = "© 2026 Apache Software Foundation | All rights reserved"
-footer_note = " ".join(
- """
-Copyright © 2026 The Apache Software Foundation. Apache TVM, Apache, the
Apache feather,
-and the Apache TVM project logo are either trademarks or registered trademarks
of
-the Apache Software Foundation.""".split("\n")
-).strip()
-
-header_logo = "https://tvm.apache.org/assets/images/logo.svg"
-header_logo_link = "https://tvm.apache.org/"
-
-header_links = [
- ("Community", "https://tvm.apache.org/community"),
- ("Download", "https://tvm.apache.org/download"),
- ("Docs", "https://tvm.apache.org/docs"),
- ("GitHub", "https://github.com/apache/tvm/"),
-]
-
-header_dropdown = {
- "name": "ASF",
- "items": [
- ("Apache Homepage", "https://apache.org/"),
- ("License", "https://www.apache.org/licenses/"),
- ("Sponsorship", "https://www.apache.org/foundation/sponsorship.html"),
- ("Security", "https://tvm.apache.org/docs/reference/security.html"),
- ("Thanks", "https://www.apache.org/foundation/thanks.html"),
- ("Events", "https://www.apache.org/events/current-event"),
- ],
-}
-
-
-def fixup_tutorials(original_url: str) -> str:
- if "docs/tutorial" in original_url:
- # tutorials true source is in Python or .txt files, but Sphinx only
sees
- # the generated .rst files so this maps them back to the source
- if original_url.endswith("index.rst"):
- # for index pages, go to the README files
- return re.sub(
- r"docs/tutorial/(.*)index\.rst",
"gallery/tutorial/\\1README.txt", original_url
- )
- else:
- # otherwise for tutorials, redirect to python files
- return re.sub(r"docs/tutorial/(.*)\.rst",
"gallery/tutorial/\\1.py", original_url)
- else:
- # do nothing for normal non-tutorial .rst files
- return original_url
-
-
-html_context = {
- "footer_copyright": footer_copyright,
- "footer_note": footer_note,
- "header_links": header_links,
- "header_dropdown": header_dropdown,
- "header_logo": header_logo,
- "header_logo_link": header_logo_link,
- "version_prefixes": [
- "main",
- "v0.8.0/",
- "v0.9.0/",
- "v0.10.0/",
- "v0.11.0/",
- "v0.12.0/",
- "v0.13.0/",
- "v0.14.0/",
- "v0.15.0/",
- "v0.16.0/",
- "v0.17.0/",
- "v0.18.0/",
- "v0.19.0/",
- "v0.20.0/",
- "v0.21.0/",
- "v0.22.0/",
- "v0.23.0/",
- ],
- "display_github": True,
- "github_user": "apache",
- "github_repo": "tvm",
- "github_version": "main/docs/",
- "theme_vcs_pageview_mode": "edit",
- "edit_link_hook_fn": fixup_tutorials,
-}
-
-# add additional overrides
-templates_path += [tlcpack_sphinx_addon.get_templates_path()]
-html_static_path += [tlcpack_sphinx_addon.get_static_path()]
-
def update_alias_docstring(name, obj, lines):
"""Update the docstring of alias functions.
diff --git a/pyproject.toml b/pyproject.toml
index db55d55daa..a4f80182cf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,7 @@
# under the License.
[build-system]
-# z3-static ships the PIC static libz3 + headers consumed by USE_Z3=ON.
+# z3-static ships the PIC static libz3 + headers for explicit USE_Z3=ON builds.
requires = [
"scikit-build-core>=0.11",
"setuptools-scm>=8",
@@ -146,8 +146,8 @@ logging.level = "INFO"
[tool.scikit-build.cmake.define]
TVM_BUILD_PYTHON_MODULE = "ON"
USE_CUDA = "OFF"
-# Statically link Z3 from the z3-static build dependency by default.
-USE_Z3 = "ON"
+# Keep Z3 disabled by default until CI's C++ toolchain can link z3-static
reliably.
+USE_Z3 = "OFF"
BUILD_TESTING = "OFF"
[tool.setuptools_scm]
diff --git a/tests/scripts/ci.py b/tests/scripts/ci.py
index be9c0573ab..eb118ee1c3 100755
--- a/tests/scripts/ci.py
+++ b/tests/scripts/ci.py
@@ -271,17 +271,17 @@ def docs(
# These are taken from the ci-gpu image via pip freeze, consult that
# if there are any changes:
https://github.com/apache/tvm/tree/main/docs#native
requirements = [
- "Sphinx==4.2.0",
- "tlcpack-sphinx-addon==0.2.1",
+ "Sphinx==8.1.3",
+ "sphinx_autodoc_annotation~=1.0",
+ "sphinx-gallery==0.20.0",
+ "sphinx-book-theme==1.1.4",
+ "pydata-sphinx-theme==0.15.4",
+ "autodocsumm==0.2.14",
"image==1.5.33",
- # Temporary git link until a release is published
-
"git+https://github.com/sphinx-gallery/sphinx-gallery.git@6142f1791151849b5bec4bf3959f75697ba226cd",
- "sphinx-rtd-theme==1.0.0",
- "matplotlib==3.3.4",
+ "matplotlib==3.10.8",
"commonmark==0.9.1",
- "Pillow==8.3.2",
- "autodocsumm==0.2.7",
- "docutils==0.16",
+ "docutils==0.21.2",
+ "Pillow==12.1.1",
]
extra_setup = [