mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Add remaining ToCs to ToC lint (#56487)
Summary: The lint was originally added in https://github.com/pytorch/pytorch/issues/54974, but at the time I didn't realize that these other Markdown files also each have a table of contents: - `GLOSSARY.md` - `torch/csrc/jit/OVERVIEW.md` - `torch/csrc/jit/docs/serialization.md` - `torch/fx/OVERVIEW.md` This PR adds those files to the lint, and also changes the rule from using a fixed list of filenames to a `git grep` command that finds all Markdown files containing this magic comment: ```md ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/56487 Test Plan: The "Lint / toc" job in GitHub Actions. Reviewed By: janeyx99 Differential Revision: D27884885 Pulled By: samestep fbshipit-source-id: 5462437502b17fba93abf5098e21754bf566a4fe
This commit is contained in:
committed by
Facebook GitHub Bot
parent
062e70590c
commit
75651e3cc4
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -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 '<!-- toc -->' -- '**.md'); do
|
||||
markdown-toc --bullets='-' -i "$FILE"
|
||||
done
|
||||
- name: Assert that regenerating the ToCs didn't change them
|
||||
|
@ -1,6 +1,7 @@
|
||||
# PyTorch Glossary
|
||||
|
||||
- [PyTorch Glossary](#pytorch-glossary)
|
||||
<!-- toc -->
|
||||
|
||||
- [Operation and Kernel](#operation-and-kernel)
|
||||
- [ATen](#aten)
|
||||
- [Operation](#operation)
|
||||
@ -19,6 +20,8 @@
|
||||
- [Tracing](#tracing)
|
||||
- [Scripting](#scripting)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
# Operation and Kernel
|
||||
|
||||
## ATen
|
||||
|
@ -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)
|
||||
<!-- toc -->
|
||||
|
||||
- [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)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
# Core Program Representation
|
||||
|
||||
|
@ -3,21 +3,25 @@
|
||||
This document explains the TorchScript serialization format, and the anatomy
|
||||
of a call to `torch::jit::save()` or `torch::jit::load()`.
|
||||
|
||||
- [Overview](#overview)
|
||||
<!-- toc -->
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Design Notes](#design-notes)
|
||||
- [`code/`: How code is serialized](#code-how-code-is-serialized)
|
||||
- [`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)
|
||||
- [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)
|
||||
- [`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)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
## Overview
|
||||
|
||||
A serialized model (call it `model.pt`) is a ZIP archive containing many
|
||||
|
@ -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)
|
||||
<!-- toc -->
|
||||
|
||||
- [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)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
# Introduction
|
||||
|
||||
|
Reference in New Issue
Block a user