diff --git a/.ci/docker/requirements-ci.txt b/.ci/docker/requirements-ci.txt index dcd2afa7a13..5527b9b4d6d 100644 --- a/.ci/docker/requirements-ci.txt +++ b/.ci/docker/requirements-ci.txt @@ -16,18 +16,21 @@ hypothesis==6.84.2 parameterized==0.9.0 # Doc build requirements, same as https://github.com/pytorch/pytorch/blob/main/.ci/docker/requirements-docs.txt -sphinx==5.3.0 +sphinx==7.2.6 +sphinxcontrib.katex==0.9.10 +breathe==4.36.0 # only if generating C++ +exhale==0.3.7 # only if generating C++ docs +docutils==0.18.1,<0.21 +sphinx-design==0.6.1 +sphinxcontrib-mermaid==1.0.0 +myst-parser==3.0.1 # if want to contribute in markdown +sphinx-gallery==0.14.0 # only if hosting interactive tutorials +sphinx-sitemap==2.7.1 sphinx-reredirects==0.1.4 -sphinx-gallery==0.14.0 -breathe==4.34.0 -exhale==0.2.3 -docutils==0.16 matplotlib>=3.9.4 +sphinx-copybutton==0.5.2 # PyTorch Theme --e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme -myst-parser==0.18.1 -sphinx_design==0.4.1 -sphinx-copybutton==0.5.0 +-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2 # script unit test requirements yaspin==3.1.0 diff --git a/docs/.gitignore b/docs/.gitignore index 980fbad8320..b9b2a3753e5 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -3,3 +3,4 @@ /sphinxbuild_py /sphinxbuild_cpp /src +source/sg_execution_times.rst diff --git a/docs/Makefile b/docs/Makefile index 219998d4b4d..627358d0387 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,6 +10,9 @@ BUILDDIR = _build # Put it first so that "make" without argument is like "make help". +html-noplot: + $(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html" + help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css deleted file mode 100644 index 3ae9585701e..00000000000 --- a/docs/source/_static/css/custom.css +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* sphinx-design styles for cards/tabs -*/ -:root { - --sd-color-info: #ee4c2c; - --sd-color-primary: #6c6c6d; - --sd-color-primary-highlight: #f3f4f7; - --sd-color-card-border-hover: #ee4c2c; - --sd-color-card-border: #f3f4f7; - --sd-color-card-background: #fff; - --sd-color-card-text: inherit; - --sd-color-card-header: transparent; - --sd-color-card-footer: transparent; - --sd-color-tabs-label-active: #ee4c2c; - --sd-color-tabs-label-hover: #ee4c2c; - --sd-color-tabs-label-inactive: #6c6c6d; - --sd-color-tabs-underline-active: #ee4c2c; - --sd-color-tabs-underline-hover: #fabdbd; - --sd-color-tabs-underline-inactive: transparent; - --sd-color-tabs-overline: rgb(222, 222, 222); - --sd-color-tabs-underline: rgb(222, 222, 222); -} - -.sd-text-info { - color: #ee4c2c; -} - -.sd-card-img-top { - background: #ee4c2c; - height: 5px !important; -} - -.sd-card { - position: relative; - background-color: #fff; - opacity: 1.0; - border-radius: 0px; - width: 30%; - border: none; - padding-bottom: 0px; -} - - -.sd-card-img:hover { - opacity: 1.0; - background-color: #f3f4f7; -} - - -.sd-card:after { - display: block; - opacity: 1; - content: ''; - border-bottom: solid 1px #ee4c2c; - background-color: #fff; - transform: scaleX(0); - transition: transform .250s ease-in-out; - transform-origin: 0% 50%; -} - -.sd-card:hover { - background-color: #fff; - opacity: 1; - border-top: 1px solid #f3f4f7; - border-left: 1px solid #f3f4f7; - border-right: 1px solid #f3f4f7; -} - -.sd-card:hover:after { - transform: scaleX(1); -} - -.card-prerequisites:hover { - transition: none; - border: none; -} - -.card-prerequisites:hover:after { - transition: none; - transform: none; -} - -.card-prerequisites:after { - display: block; - content: ''; - border-bottom: none; - background-color: #fff; - transform: none; - transition: none; - transform-origin: none; -} - - -details.sd-dropdown { - font-weight: 300; - width: auto; -} - -details.sd-dropdown:after { - border: none; - transition: none; -} - -details.sd-dropdown:hover { - border: none; - transition: none; -} - -details.sd-dropdown .sd-summary-content { - font-weight: 300; -} - -details.sd-dropdown .highlight .n { - font-weight: normal; -} - -.et-page-column1 { - float: left; - width: 70%; - font-size: 1rem; -} - -.et-page-column2 { - float: right; - padding-top: 40px; - padding-left: 60px; - padding-right: 60px; - padding-bottom: 60px; - width: 30%; -} - -.et-page-column-row:after { - content: ""; - display: table; - clear: both; -} - -/* For screens smaller than 768px (typical mobile devices) */ -@media screen and (max-width: 768px) { - .et-page-column1, .et-page-column2 { - float: none; /* Remove floats */ - width: 100%; /* Full width for both columns */ - padding: 0; - font-size: 1rem; - } - - .et-page-column2 img { - display: none; - } - .et-page-column-row:after { - content: ""; - display: table; - clear: both; - } -} - -article.pytorch-article .class .method dt { - border-top: none; -} - -article.pytorch-article .class .simple dt { - border-top: none; -} - -article.pytorch-article .function dt.sig { - border-top: none; -} - -/* styles needed for 3rd level left nav */ - -.pytorch-left-menu ul, .pytorch-right-menu ul { - margin-left: 1.2em; -} - -.pytorch-left-menu li.toctree-l2.current > a { - color: #e44c2c; -} - -/* The next two styles enable normal hihglighting in the third level nav -in right side bar.*/ -#pytorch-right-menu .side-scroll-highlight { - color: #6c6c6d; -} - -#pytorch-right-menu a.reference.internal.side-scroll-highlight-local { - color: #ee4c2c; -} diff --git a/docs/source/_static/css/progress-bar.css b/docs/source/_static/css/progress-bar.css deleted file mode 100644 index 9b3aeb9d301..00000000000 --- a/docs/source/_static/css/progress-bar.css +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -.progress-bar-wrapper { - margin-top: auto; - display: flex; - justify-content: space-between; - margin-bottom: 20px; - position: sticky; - top: 0; - background: white; - padding-top: 20px; - padding-bottom: 20px; - z-index: 2; -} - -.progress-bar-item { - position: relative; - display: flex; - flex-direction: column; - align-items: center; - flex: 1; - - @media (max-width: 768px) { - font-size: 12px; - } -} - -.progress-bar-item::before { - position: absolute; - content: ""; - border-bottom: 2px solid #ccc; - width: 100%; - top: 20px; - left: -50%; - z-index: 2; -} - -.progress-bar-item::after { - position: absolute; - content: ""; - border-bottom: 2px solid #ccc; - width: 100%; - top: 20px; - left: 50%; - z-index: 2; -} - -.progress-bar-item .step-number { - position: relative; - z-index: 5; - display: flex; - justify-content: center; - align-items: center; - width: 40px; - height: 40px; - border-radius: 50%; - border-color: #812CE5; - border-style: solid; - border-width: 1px; - color: #812CE5; - background: #fff; - margin-bottom: 6px; -} - -.progress-bar-item.active { - font-weight: bold; -} - -.progress-bar-item.completed .step-number { - background-color: #812CE5; - color: white; -} - -.progress-bar-item.completed::after { - position: absolute; - content: ""; - border-bottom: 2px solid #812CE5; - width: 100%; - top: 20px; - left: 50%; - z-index: 3; -} - -.progress-bar-item:first-child::before { - content: none; -} - -.progress-bar-item:last-child::after { - content: none; -} - -.progress-bar-item a:link { - color: #262626 !important; -} - -.step-caption:first-child { - margin-left: 10px; -} - -.step-caption { - text-align: center; -} - -.step-caption a:link { - color: #262626 !important; -} - -.step-caption a:hover { - color: #ee4c2c; - text-decoration: underline; -} diff --git a/docs/source/_static/js/progress-bar.js b/docs/source/_static/js/progress-bar.js deleted file mode 100644 index 878251cfc60..00000000000 --- a/docs/source/_static/js/progress-bar.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -document.addEventListener("DOMContentLoaded", function() { - const steps = Array.from(document.querySelectorAll('.progress-bar-item')); - const h2s = Array.from(document.querySelectorAll('h2')); - - // Populate captions from h2s - h2s.forEach((h2, index) => { - const captionElem = document.getElementById(`caption-${index + 1}`); - if (captionElem) { - captionElem.innerText = h2.innerText; - } - }); - - // Throttle function to optimize performance - function throttle(func, delay) { - let lastCall = 0; - return function() { - const now = Date.now(); - if (now - lastCall < delay) return; - lastCall = now; - func.apply(this, arguments); - } - } - - document.addEventListener("scroll", throttle(function() { - let activeIndex = 0; - let closestDistance = Number.MAX_VALUE; - const totalHeight = document.documentElement.scrollHeight; - const viewportHeight = window.innerHeight; - const scrollBottom = window.scrollY + viewportHeight; - const isAtBottom = totalHeight === scrollBottom; - - h2s.forEach((h2, index) => { - const rect = h2.getBoundingClientRect(); - const distanceToTop = Math.abs(rect.top); - if (distanceToTop < closestDistance) { - closestDistance = distanceToTop; - activeIndex = index; - } - }); - - steps.forEach((step, index) => { - if (isAtBottom) { - step.classList.remove('active'); - step.classList.add('completed'); - } else { - if (index < activeIndex) { - step.classList.remove('active'); - step.classList.add('completed'); - } else if (index === activeIndex) { - step.classList.add('active'); - step.classList.remove('completed'); - } else { - step.classList.remove('active', 'completed'); - } - } - }); - }, 100)); -}); diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html deleted file mode 100644 index 55f91103b35..00000000000 --- a/docs/source/_templates/layout.html +++ /dev/null @@ -1,145 +0,0 @@ -{% extends "!layout.html" %} - -{% block extrahead %} -{% if 'getting-started-setup' in pagename%} - - -{% elif 'compiler-delegate-and-partitioner' in pagename%} - - -{% elif 'xtensa' in pagename%} - - -{% elif 'qualcomm-ai-engine-direct-backend' in pagename%} - - -{% elif 'coreml' in pagename%} - - -{% elif 'mps' in pagename%} - - -{% endif %} -{{ super() }} -{% endblock %} - - -{% block sidebartitle %} -
- {{ version }} ▼ -
- {% include "searchbox.html" %} -{% endblock %} - -{%- block content %} -{% if 'tutorials' in pagename %} - - - -{% endif %} -{{ super() }} - -{% endblock %} - - - -{% block menu %} - {% if 'singlehtml' not in builder %} - {% set global_toc = toctree(collapse=theme_collapse_navigation|tobool, - includehidden=theme_includehidden|tobool, - titles_only=theme_titles_only|tobool) %} - {% endif %} - {% if global_toc %} - {{ global_toc }} - {% else %} - -
{{ toc }}
- {% endif %} -{% endblock %} - - -{% block footer %} -{{ super() }} - - -{{ super() }} - - -{{ super() }} - -{% endblock %} diff --git a/docs/source/api.md b/docs/source/api.md new file mode 100644 index 00000000000..4f6160d258a --- /dev/null +++ b/docs/source/api.md @@ -0,0 +1,11 @@ +# API + +```{toctree} +:maxdepth: 1 + +export-to-executorch-api-reference +executorch-runtime-api-reference +runtime-python-api-reference +api-life-cycle +Javadoc +``` diff --git a/docs/source/backend-development.md b/docs/source/backend-development.md new file mode 100644 index 00000000000..ec5ceb3b37a --- /dev/null +++ b/docs/source/backend-development.md @@ -0,0 +1,11 @@ +# Backend Development + +```{toctree} +:maxdepth: 1 + +backend-delegates-integration +backend-delegates-xnnpack-reference +backend-delegates-dependencies +compiler-delegate-and-partitioner +debug-backend-delegate +``` diff --git a/docs/source/backends.md b/docs/source/backends.md new file mode 100644 index 00000000000..53db638f36d --- /dev/null +++ b/docs/source/backends.md @@ -0,0 +1,17 @@ +# Backends + +```{toctree} +:maxdepth: 1 + +backends-overview +backends-xnnpack +backends-coreml +backends-mps +backends-vulkan +backends-arm-ethos-u +backends-qualcomm +backends-mediatek +backends-cadence +OpenVINO Backend +backends-nxp +``` diff --git a/docs/source/compiler-entry-points.md b/docs/source/compiler-entry-points.md new file mode 100644 index 00000000000..ac5623c6769 --- /dev/null +++ b/docs/source/compiler-entry-points.md @@ -0,0 +1,9 @@ +# Compiler Entry Points + +```{toctree} +:maxdepth: 1 + +compiler-backend-dialect +compiler-custom-compiler-passes +compiler-memory-planning +``` diff --git a/docs/source/conf.py b/docs/source/conf.py index 65845c03868..f1869d38a46 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ import sys from typing import Any -import pytorch_sphinx_theme +import pytorch_sphinx_theme2 # type: ignore[import-untyped] # To let us import ./custom_directives.py sys.path.insert(0, os.path.abspath(".")) @@ -63,13 +63,10 @@ "sphinx_design", "sphinx_gallery.gen_gallery", "sphinx_reredirects", + "sphinx_sitemap", + "sphinxcontrib.mermaid", ] -if not FBCODE: - extensions += [ - "executorch_custom_versions", - ] - this_file_dir = os.path.abspath(os.path.dirname(__file__)) doxygen_xml_dir = os.path.join( os.path.dirname(this_file_dir), # {repo_root}/docs/ @@ -99,14 +96,23 @@ print(f"Version: {version}") html_title = " ".join((project, version, "documentation")) +html_baseurl = "https://docs.pytorch.org/executorch/" # needed for sphinx-sitemap +sitemap_locales = [None] +sitemap_excludes = [ + "search.html", + "genindex.html", +] +sitemap_url_scheme = "{link}" + breathe_projects = {"ExecuTorch": "../build/xml/"} breathe_default_project = "ExecuTorch" -templates_path = ["_templates"] autodoc_typehints = "description" myst_enable_extensions = [ "colon_fence", + "deflist", + "html_image", ] myst_heading_anchors = 4 @@ -162,23 +168,78 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "pytorch_sphinx_theme" -html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()] +html_theme = "pytorch_sphinx_theme2" +html_theme_path = [pytorch_sphinx_theme2.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # + +switcher_version = version + html_theme_options = { + "logo": { + "image_light": "_static/img/et-logo.png", + "image_dark": "_static/img/et-logo.png", + }, + "navigation_with_keys": False, + "canonical_url": "https://docs.pytorch.org/executorch/stable/", + "switcher": { + "json_url": "https://docs.pytorch.org/executorch/executorch-versions.json", # for testing only, will need to replace to the correct json file on the executorch website when it's added in the repo. + "version_match": switcher_version, + }, + "show_toc_level": 2, + "analytics_id": "GTM-T8XT4PS", + "icon_links": [ + { + "name": "X", + "url": "https://x.com/PyTorch", + "icon": "fa-brands fa-x-twitter", + }, + { + "name": "GitHub", + "url": "https://github.com/pytorch/executorch", + "icon": "fa-brands fa-github", + }, + { + "name": "Discourse", + "url": "https://discuss.pytorch.org/", + "icon": "fa-brands fa-discourse", + }, + { + "name": "PyPi", + "url": "https://pypi.org/project/executorch", + "icon": "fa-brands fa-python", + }, + ], + "show_version_warning_banner": True, + "use_edit_page_button": True, + "header_links_before_dropdown": 8, + "navbar_align": "left", + "navbar_start": ["navbar-logo", "version-switcher"], + "navbar_center": ["navbar-nav"], + "navbar_end": ["search-field-custom", "theme-switcher", "navbar-icon-links"], + "navbar_persistent": [], +} + +theme_variables = pytorch_sphinx_theme2.get_theme_variables() +templates_path = [ + "_templates", + os.path.join(os.path.dirname(pytorch_sphinx_theme2.__file__), "templates"), +] + +html_context = { + "theme_variables": theme_variables, + "display_github": True, + "github_url": "https://github.com", + "github_user": "pytorch", + "github_repo": "executorch", + "feedback_url": "https://github.com/pytorch/executorch", + "github_version": "main", + "doc_path": "docs/source", "pytorch_project": "executorch", "display_version": True, - "logo_only": True, - "collapse_navigation": True, # changed to True to enable 3rd level nav. - "sticky_navigation": False, - "navigation_depth": 4, - "includehidden": True, - "titles_only": False, - "analytics_id": "GTM-T8XT4PS", } # Add any paths that contain custom static files (such as style sheets) here, @@ -186,14 +247,15 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_css_files = ["css/custom.css", "progress-bar.css"] -html_js_files = ["js/progress-bar.js"] +# Add custom 404 page for GitHub Pages +html_additional_pages = {"404": "404.html"} + # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { "python": ("https://docs.python.org/", None), "numpy": ("https://numpy.org/doc/stable/", None), - "torch": ("https://pytorch.org/docs/stable/", None), + "torch": ("https://docs.pytorch.org/docs/stable/", None), } # Redirects for moved pages diff --git a/docs/source/developer-tools.md b/docs/source/developer-tools.md new file mode 100644 index 00000000000..d3b90b7adc8 --- /dev/null +++ b/docs/source/developer-tools.md @@ -0,0 +1,16 @@ +# Tools + +```{toctree} +:maxdepth: 1 + +devtools-overview +bundled-io +etrecord +etdump +runtime-profiling +model-debugging +model-inspector +memory-planning-inspection +delegate-debugging +devtools-tutorial +``` diff --git a/docs/source/examples.md b/docs/source/examples.md new file mode 100644 index 00000000000..6a3a8ac29c9 --- /dev/null +++ b/docs/source/examples.md @@ -0,0 +1,9 @@ +# Examples + +```{toctree} +:maxdepth: 1 + +Building an ExecuTorch Android Demo App +Building an ExecuTorch iOS Demo App +tutorial-arm +``` diff --git a/docs/source/executorch_custom_versions.py b/docs/source/executorch_custom_versions.py deleted file mode 100644 index 590f21b10ec..00000000000 --- a/docs/source/executorch_custom_versions.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. - -""" -Sphinx extension to replace ${executorch_version:TAG} with version numbers. - -It also defines a special variable ${executorch_version} that is set to the value -of `EXECUTORCH_VERSION` defined in this file. - -This custom extension pulls third-party version strings from files in the -.ci/docker/ci_commit_pins directory, and uses them to expand specific strings in -markdown files. - -For example, `${executorch_version:pytorch}` will be replaced with the -appropriate pytorch version string used by CI. -""" - -import os - -from docutils import nodes - -version_file_names = [ - "buck2.txt", - "pytorch.txt", -] - -EXECUTORCH_VERSION = "0.7.0" - -variables: dict[str, str] = {} - - -def populate_version_variable(): - variables["${executorch_version}"] = EXECUTORCH_VERSION - cwd = os.getcwd() - version_file_path = os.path.join(cwd, "..", ".ci", "docker", "ci_commit_pins") - - for file_name in version_file_names: - file_path = os.path.join(version_file_path, file_name) - with open(file_path, "r") as f: - var_name = "${executorch_version:" + file_name.split(".")[0] + "}" - variables[var_name] = f.read().strip() - - -populate_version_variable() - - -def replace_variables(app, doctree, docname): - # Replace in regular text: - for node in doctree.traverse(nodes.Text): - new_text = node.astext() - for var, value in variables.items(): - new_text = new_text.replace(var, value) - node.parent.replace(node, nodes.Text(new_text)) - # Replace in code blocks: - for node in doctree.traverse(nodes.literal_block): - new_text = node.astext() - for var, value in variables.items(): - new_text = new_text.replace(var, value) - - classes = node.get("classes", []) - # check if the output is generated by sphinx-gallery and if yes, keep the original - # CSS classes. Otherwise, the sphinx-gallery generated outputs are - # formatted as regular code blocks with gray background instead of pink. - is_sphinx_gallery = any("sphx-glr" in class_ for class_ in classes) - - language = node.get("language") - - if is_sphinx_gallery: - new_literal_block = nodes.literal_block(new_text, new_text, classes=classes) - else: - new_literal_block = nodes.literal_block( - new_text, - new_text, - classes=["highlight-none", "notranslate"], - language=language, - ) - - node.parent.replace(node, new_literal_block) - - -def setup(app): - app.connect("doctree-resolved", replace_variables) diff --git a/docs/source/index.md b/docs/source/index.md index b308041b609..fd0957d8fd4 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -115,186 +115,20 @@ ExecuTorch provides support for: ```{toctree} :glob: :maxdepth: 1 -:caption: Introduction -:hidden: - -intro-overview -intro-how-it-works -getting-started-architecture -concepts -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Usage -:hidden: - -getting-started -using-executorch-export -using-executorch-android -using-executorch-ios -using-executorch-cpp -using-executorch-runtime-integration -using-executorch-troubleshooting -using-executorch-building-from-source -using-executorch-faqs -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Examples -:hidden: - -Building an ExecuTorch Android Demo App -Building an ExecuTorch iOS Demo App -tutorial-arm-ethos-u -tutorial-arm-vgf -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Backends -:hidden: - -backends-overview -backends-xnnpack -backends-coreml -backends-mps -backends-vulkan -backends-arm-ethos-u -backends-arm-vgf -backends-qualcomm -backends-mediatek -backends-cadence -OpenVINO Backend -backends-nxp -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Developer Tools -:hidden: - -devtools-overview -bundled-io -etrecord -etdump -runtime-profiling -model-debugging -model-inspector -memory-planning-inspection -delegate-debugging -devtools-tutorial -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Runtime -:hidden: - -runtime-overview -extension-module -extension-tensor -running-a-model-cpp-tutorial -runtime-backend-delegate-implementation-and-linking -runtime-platform-abstraction-layer -portable-cpp-programming -pte-file-format -ptd-file-format -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: API Reference -:hidden: - -export-to-executorch-api-reference -executorch-runtime-api-reference -runtime-python-api-reference -api-life-cycle -Javadoc -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Quantization -:hidden: - -quantization-overview -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Kernel Library -:hidden: - -kernel-library-overview -kernel-library-custom-aten-kernel -kernel-library-selective-build -``` - -```{toctree} -:glob: -:maxdepth: 2 -:caption: Working with LLMs -:hidden: - -Getting Started -Exporting LLMs with export_llm -Exporting custom LLMs -Running with C++ -Running on Android -Running on Android -Running on iOS -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Backend Development -:hidden: - -backend-delegates-integration -backend-delegates-xnnpack-reference -backend-delegates-dependencies -compiler-delegate-and-partitioner -debug-backend-delegate -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: IR Specification -:hidden: - -ir-exir -ir-ops-set-definition -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Compiler Entry Points -:hidden: - -compiler-backend-dialect -compiler-custom-compiler-passes -compiler-memory-planning -``` - -```{toctree} -:glob: -:maxdepth: 1 -:caption: Contributing :hidden: +intro +usage +examples +backends +developer-tools +runtime +api +quantization +kernel-library +llm/working-with-llms +backend-development +ir-specification +compiler-entry-points contributing ``` diff --git a/docs/source/intro.md b/docs/source/intro.md new file mode 100644 index 00000000000..f6609cc3ba7 --- /dev/null +++ b/docs/source/intro.md @@ -0,0 +1,10 @@ +# Intro + +```{toctree} +:maxdepth: 1 + +intro-overview +intro-how-it-works +getting-started-architecture +concepts +``` diff --git a/docs/source/ir-specification.md b/docs/source/ir-specification.md new file mode 100644 index 00000000000..c58098ffc67 --- /dev/null +++ b/docs/source/ir-specification.md @@ -0,0 +1,8 @@ +# IR Specification + +```{toctree} +:maxdepth: 1 + +ir-exir +ir-ops-set-definition +``` diff --git a/docs/source/kernel-library.md b/docs/source/kernel-library.md new file mode 100644 index 00000000000..a995a20973b --- /dev/null +++ b/docs/source/kernel-library.md @@ -0,0 +1,9 @@ +# Kernel Library + +```{toctree} +:maxdepth: 1 + +kernel-library-overview +kernel-library-custom-aten-kernel +kernel-library-selective-build +``` diff --git a/docs/source/llm/working-with-llms.md b/docs/source/llm/working-with-llms.md new file mode 100644 index 00000000000..17b2e46c0a5 --- /dev/null +++ b/docs/source/llm/working-with-llms.md @@ -0,0 +1,13 @@ +# Working with LLMs + +```{toctree} +:maxdepth: 1 + +getting-started +export-llm +export-custom-llm +run-with-c-plus-plus +llama-demo-android +build-run-llama3-qualcomm-ai-engine-direct-backend +run-on-ios +``` diff --git a/docs/source/quantization.md b/docs/source/quantization.md new file mode 100644 index 00000000000..b5ee9f21897 --- /dev/null +++ b/docs/source/quantization.md @@ -0,0 +1,7 @@ +# Quantization + +```{toctree} +:maxdepth: 1 + +quantization-overview +``` diff --git a/docs/source/runtime.md b/docs/source/runtime.md new file mode 100644 index 00000000000..1d96cc53188 --- /dev/null +++ b/docs/source/runtime.md @@ -0,0 +1,15 @@ +# Runtime + +```{toctree} +:maxdepth: 1 + +runtime-overview +extension-module +extension-tensor +running-a-model-cpp-tutorial +runtime-backend-delegate-implementation-and-linking +runtime-platform-abstraction-layer +portable-cpp-programming +pte-file-format +ptd-file-format +``` diff --git a/docs/source/usage.md b/docs/source/usage.md new file mode 100644 index 00000000000..6ffc136093b --- /dev/null +++ b/docs/source/usage.md @@ -0,0 +1,19 @@ +# Usage + +This section describes how to use Executorch. It covers everything from +getting started to platform-specific implementations, runtime integration, +troubleshooting, and frequently asked questions. + +```{toctree} +:maxdepth: 1 + +getting-started +using-executorch-export +using-executorch-android +using-executorch-ios +using-executorch-cpp +using-executorch-runtime-integration +using-executorch-troubleshooting +using-executorch-building-from-source +using-executorch-faqs +```