From a43d69d9dc0b469ffa9e94b4bc33c8f7ea0ca578 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Mon, 27 Jul 2020 13:41:28 -0700 Subject: [PATCH] [DOCS][REFACTOR] Reorganize the docs. (#6146) - Move most toctree to `:hiden:` so there can be top-level categorizations in the navigation bar. - Move frontend guide into design and developer guides - Move get started tutorials into its separate folder. Co-authored-by: Chris Hoge Co-authored-by: Chris Hoge --- docs/api/links.rst | 4 +- docs/conf.py | 3 +- docs/{ => dev}/frontend/tensorflow.rst | 0 docs/dev/how_to.rst | 31 +++++++++++++ docs/dev/index.rst | 16 +++---- docs/index.rst | 54 +++++++++++++++++----- tutorials/README.txt | 4 +- tutorials/get_started/README.txt | 2 + .../{ => get_started}/cross_compilation_and_rpc.py | 0 tutorials/{ => get_started}/relay_quick_start.py | 0 .../{ => get_started}/tensor_expr_get_started.py | 0 11 files changed, 87 insertions(+), 27 deletions(-) rename docs/{ => dev}/frontend/tensorflow.rst (100%) create mode 100644 docs/dev/how_to.rst create mode 100644 tutorials/get_started/README.txt rename tutorials/{ => get_started}/cross_compilation_and_rpc.py (100%) rename tutorials/{ => get_started}/relay_quick_start.py (100%) rename tutorials/{ => get_started}/tensor_expr_get_started.py (100%) diff --git a/docs/api/links.rst b/docs/api/links.rst index 8c22cf8..4b8ab4d 100644 --- a/docs/api/links.rst +++ b/docs/api/links.rst @@ -15,8 +15,8 @@ specific language governing permissions and limitations under the License. -Links to API References -======================= +Links to Other API References +============================= This page contains links to API references that are build with different doc build system. diff --git a/docs/conf.py b/docs/conf.py index f25c07d..73836e9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -186,7 +186,8 @@ examples_dirs = ["../tutorials/", "../vta/tutorials/"] gallery_dirs = ["tutorials", "vta/tutorials"] subsection_order = ExplicitOrder( - ['../tutorials/frontend', + ['../tutorials/get_started', + '../tutorials/frontend', '../tutorials/language', '../tutorials/optimize', '../tutorials/autotvm', diff --git a/docs/frontend/tensorflow.rst b/docs/dev/frontend/tensorflow.rst similarity index 100% rename from docs/frontend/tensorflow.rst rename to docs/dev/frontend/tensorflow.rst diff --git a/docs/dev/how_to.rst b/docs/dev/how_to.rst new file mode 100644 index 0000000..ff078fc --- /dev/null +++ b/docs/dev/how_to.rst @@ -0,0 +1,31 @@ +.. 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. + +.. _dev-how-to: + +Developer How-To Guide +====================== +This section contains a collection of tips about how to work on +various areas of the TVM stack. + +.. toctree:: + :maxdepth: 1 + + relay_add_op + relay_add_pass + relay_bring_your_own_codegen + codebase_walkthrough diff --git a/docs/dev/index.rst b/docs/dev/index.rst index 8852341..9fe8394 100644 --- a/docs/dev/index.rst +++ b/docs/dev/index.rst @@ -27,7 +27,7 @@ This page is organized as follows: - The `Logical Architecture Components`_ section describes the logical components. The sections after are specific guides focused on each logical component, organized by the component's name. -- The `How Tos`_ section contains useful tutorials to solve specific development problems. +- Feel free to also checkout the :ref:`dev-how-to` for useful development tips. This guide provides a few complementary views of the architecture. First, we review a single end-to-end compilation flow and discuss the key data structures and the transformations. @@ -375,19 +375,15 @@ customize the search and plugin their algorithms from the Python binding. benchmark - -How Tos -------- -This section contains a collection of tips about how to work on -various areas of the TVM stack. +Frontends +--------- +Frontends ingest models from different frameworks into the TVM stack. +:py:mod:`tvm.relay.frontend` is the namespace for model ingestion APIs. .. toctree:: :maxdepth: 1 - relay_add_op - relay_add_pass - relay_bring_your_own_codegen - codebase_walkthrough + frontend/tensorflow Security diff --git a/docs/index.rst b/docs/index.rst index 5e3fa45..defaf4a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,43 +18,75 @@ TVM Documentation ================= +TVM is an open deep learning compiler stack for CPUs, GPUs, and specialized accelerators. It aims to close the gap between the productivity-focused deep learning frameworks, and the performance- or efficiency-oriented hardware backends. + + Get Started ----------- + +- Follow the :doc:`instructions ` to install TVM. +- Checkout the :doc:`Tutorials `. + +For Developers +-------------- + +- :doc:`dev/index` is useful for developers who want to understand the + architecture of TVM and/or actively develop on the project. +- :doc:`dev/how_to` gives quick development tips on various topics. + + .. toctree:: :maxdepth: 1 + :caption: Get Started + :hidden: install/index + contribute/index + +.. toctree:: + :maxdepth: 1 + :caption: Tutorials + :hidden: + tutorials/index - vta/index + + +.. toctree:: + :maxdepth: 1 + :caption: How-to Guide + :hidden: + deploy/index - contribute/index - faq -API Reference -------------- .. toctree:: :maxdepth: 2 + :caption: References + :hidden: langref/index api/python/index api/links -Developer Guide ---------------- .. toctree:: :maxdepth: 2 + :hidden: + :caption: For Developers dev/index + dev/how_to -Frontends ---------- .. toctree:: - :maxdepth: 1 + :maxdepth: 2 + :hidden: + :caption: MISC + + vta/index + faq - frontend/tensorflow Index ----- + .. toctree:: :maxdepth: 1 diff --git a/tutorials/README.txt b/tutorials/README.txt index 0657374..8b13789 100644 --- a/tutorials/README.txt +++ b/tutorials/README.txt @@ -1,3 +1 @@ -Tutorials -========= -This page contains the tutorials about TVM. + diff --git a/tutorials/get_started/README.txt b/tutorials/get_started/README.txt new file mode 100644 index 0000000..41b1b44 --- /dev/null +++ b/tutorials/get_started/README.txt @@ -0,0 +1,2 @@ +Get Started Tutorials +--------------------- diff --git a/tutorials/cross_compilation_and_rpc.py b/tutorials/get_started/cross_compilation_and_rpc.py similarity index 100% rename from tutorials/cross_compilation_and_rpc.py rename to tutorials/get_started/cross_compilation_and_rpc.py diff --git a/tutorials/relay_quick_start.py b/tutorials/get_started/relay_quick_start.py similarity index 100% rename from tutorials/relay_quick_start.py rename to tutorials/get_started/relay_quick_start.py diff --git a/tutorials/tensor_expr_get_started.py b/tutorials/get_started/tensor_expr_get_started.py similarity index 100% rename from tutorials/tensor_expr_get_started.py rename to tutorials/get_started/tensor_expr_get_started.py -- 2.7.4