diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b061df13c7c7f2..62941385aa1068 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -128,7 +128,7 @@ jobs: run: | set -eux export PATH=~/.npm-global/bin:"$PATH" - for FILE in {CONTRIBUTING,README}.md; do + for FILE in $(git grep -Il '' -- '**.md'); do markdown-toc --bullets='-' -i "$FILE" done - name: Assert that regenerating the ToCs didn't change them diff --git a/GLOSSARY.md b/GLOSSARY.md index 24300e7f722b83..bf9e6a8b6c7a10 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -1,6 +1,7 @@ # PyTorch Glossary -- [PyTorch Glossary](#pytorch-glossary) + + - [Operation and Kernel](#operation-and-kernel) - [ATen](#aten) - [Operation](#operation) @@ -19,6 +20,8 @@ - [Tracing](#tracing) - [Scripting](#scripting) + + # Operation and Kernel ## ATen diff --git a/torch/csrc/jit/OVERVIEW.md b/torch/csrc/jit/OVERVIEW.md index 49abf278611daa..f6c6247264c0b8 100644 --- a/torch/csrc/jit/OVERVIEW.md +++ b/torch/csrc/jit/OVERVIEW.md @@ -14,8 +14,8 @@ Sections start with a reference to the source file where the code related to the ## Table of Contents -- [JIT Technical Overview](#jit-technical-overview) - - [Table of Contents](#table-of-contents) + + - [Core Program Representation](#core-program-representation) - [Modules](#modules) - [Parameters](#parameters) @@ -26,6 +26,7 @@ Sections start with a reference to the source file where the code related to the - [Block](#block) - [If](#if) - [Loops](#loops) + - [With](#with) - [Value](#value) - [Type](#type) - [Generating Programs](#generating-programs) @@ -37,11 +38,12 @@ Sections start with a reference to the source file where the code related to the - [Lexer](#lexer) - [Tokens](#tokens) - [Parser](#parser) - - [Compiler](#compiler) + - [IR Emitter](#ir-emitter) - [SugaredValue](#sugaredvalue) - [Resolver](#resolver) - [Environment](#environment) - - [SSA Conversion](#convert_to_ssa) + - [Conversion To SSA](#conversion-to-ssa) + - [Exit Transform](#exit-transform) - [Python-Compiler Interaction](#python-compiler-interaction) - [Executing Programs](#executing-programs) - [Evaluation Semantics](#evaluation-semantics) @@ -59,7 +61,7 @@ Sections start with a reference to the source file where the code related to the - [Aliasing and mutation in the PyTorch API](#aliasing-and-mutation-in-the-pytorch-api) - [Aliasing and mutation annotations in FunctionSchema](#aliasing-and-mutation-annotations-in-functionschema) - [Alias Analysis in the IR](#alias-analysis-in-the-ir) - - [Writing optimization passes with AliasDb](#writing-optimization-passes-with-aliasdb) + - [Writing optimization passes with `AliasDb`](#writing-optimization-passes-with-aliasdb) - [Profiling Programs](#profiling-programs) - [Saving Programs](#saving-programs) - [Testing Programs](#testing-programs) @@ -67,6 +69,7 @@ Sections start with a reference to the source file where the code related to the - [Python Printer](#python-printer) - [Python Bindings](#python-bindings) + # Core Program Representation diff --git a/torch/csrc/jit/docs/serialization.md b/torch/csrc/jit/docs/serialization.md index 2fc3c9abb4290b..b5187794e1600c 100644 --- a/torch/csrc/jit/docs/serialization.md +++ b/torch/csrc/jit/docs/serialization.md @@ -3,20 +3,24 @@ This document explains the TorchScript serialization format, and the anatomy of a call to `torch::jit::save()` or `torch::jit::load()`. - - [Overview](#overview) - - [Design Notes](#design-notes) - - [`code/`: How code is serialized](#code-how-code-is-serialized) - - [Printing code objects as Python source](#printing-code-objects-as-python-source) - - [Placing the source code in the archive](#placing-the-source-code-in-the-archive) - - [How data is serialized](#how-data-is-serialized) - - [`data.pkl`: How module object state is serialized](#datapkl-how-module-object-state-is-serialized) - - [`data/`: How tensors are serialized](#tensors-how-tensors-are-serialized) - - [`constants.pkl`: Constants in code](#constantspkl-constants-in-code) - - [`torch:jit::load()`](#torchjitload) - - [`__getstate__` and `__setstate__`](#getstate-and-setstate) - - [Appendix: `CompilationUnit` and code object ownership](#appendix-compilationunit-and-code-object-ownership) - - [`CompilationUnit` ownership semantics](#compilationunit-ownership-semantics) - - [Code object naming](#code-object-naming) + + +- [Overview](#overview) + - [Design Notes](#design-notes) +- [`code/`: How code is serialized](#code-how-code-is-serialized) + - [Printing code objects as Python source](#printing-code-objects-as-python-source) + - [Placing the source code in the archive](#placing-the-source-code-in-the-archive) +- [How data is serialized](#how-data-is-serialized) + - [`data.pkl`: How module object state is serialized](#datapkl-how-module-object-state-is-serialized) + - [`data/`: How tensors are serialized](#data-how-tensors-are-serialized) +- [`constants.pkl`: Constants in code](#constantspkl-constants-in-code) +- [`torch:jit::load()`](#torchjitload) +- [`__getstate__` and `__setstate__`](#__getstate__-and-__setstate__) +- [Appendix: `CompilationUnit` and code object ownership](#appendix-compilationunit-and-code-object-ownership) + - [`CompilationUnit` ownership semantics](#compilationunit-ownership-semantics) + - [Code object naming](#code-object-naming) + + ## Overview diff --git a/torch/fx/OVERVIEW.md b/torch/fx/OVERVIEW.md index f3c0c716d73ea6..f2995eb7a77dde 100644 --- a/torch/fx/OVERVIEW.md +++ b/torch/fx/OVERVIEW.md @@ -4,21 +4,22 @@ FX is a toolkit for pass writers to facilitate Python-to-Python transformation o ## Table of Contents -- [FX Technical Overview](#fx-technical-overview) - - [Table of Contents](#table-of-contents) + + - [Introduction](#introduction) - [Motivation](#motivation) - [Use Cases](#use-cases) - [Technical Details](#technical-details) - [Internal Structure](#internal-structure) - [Graph](#graph) - - [Graph Module](#graph-module) + - [GraphModule](#graphmodule) - [Symbolic Tracing](#symbolic-tracing) - - [About](#about) - [Tracer](#tracer) - [Proxy](#proxy) -- [The FX IR](#ir) -- [Transformation and Codegen](#codegen) +- [The FX IR](#the-fx-ir) +- [Transformation and Codegen](#transformation-and-codegen) + + # Introduction