Summary: Context: https://github.com/pytorch/pytorch/pull/53299#discussion_r587882857 These are the only hand-written parts of this diff: - the addition to `.github/workflows/lint.yml` - the file endings changed in these four files (to appease FB-internal land-blocking lints): - `GLOSSARY.md` - `aten/src/ATen/core/op_registration/README.md` - `scripts/README.md` - `torch/csrc/jit/codegen/fuser/README.md` The rest was generated by running this command (on macOS): ``` git grep -I -l ' $' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' | xargs gsed -i 's/ *$//' ``` I looked over the auto-generated changes and didn't see anything that looked problematic. Pull Request resolved: https://github.com/pytorch/pytorch/pull/53406 Test Plan: This run (after adding the lint but before removing existing trailing spaces) failed: - https://github.com/pytorch/pytorch/runs/2043032377 This run (on the tip of this PR) succeeded: - https://github.com/pytorch/pytorch/runs/2043296348 Reviewed By: walterddr, seemethere Differential Revision: D26856620 Pulled By: samestep fbshipit-source-id: 3f0de7f7c2e4b0f1c089eac9b5085a58dd7e0d97
2.4 KiB
PyTorch Glossary
Operation and Kernel
ATen
Short for "A Tensor Library". The foundational tensor and mathematical operation library on which all else is built.
Operation
A unit of work. For example, the work of matrix multiplication is an operation called aten::matmul.
Native Operation
An operation that comes natively with PyTorch ATen, for example aten::matmul.
Custom Operation
An Operation that is defined by users and is usually a Compound Operation. For example, this tutorial details how to create Custom Operations.
Kernel
Implementation of a PyTorch operation, specifying what should be done when an operation executes.
Compound Operation
A Compound Operation is composed of other operations. Its kernel is usually device-agnostic. Normally it doesn't have its own derivative functions defined. Instead, AutoGrad automatically computes its derivative based on operations it uses.
Composite Operation
Same as Compound Operation.
Non-Leaf Operation
Same as Compound Operation.
Leaf Operation
An operation that's considered a basic operation, as opposed to a Compound Operation. Leaf Operation always has dispatch functions defined, usually has a derivative function defined as well.
Device Kernel
Device-specific kernel of a leaf operation.
Compound Kernel
Opposed to Device Kernels, Compound kernels are usually device-agnostic and belong to Compound Operations.
JIT Compilation
JIT
Just-In-Time Compilation.
TorchScript
An interface to the TorchScript JIT compiler and interpreter.
Tracing
Using torch.jit.trace
on a function to get an executable that can be optimized
using just-in-time compilation.
Scripting
Using torch.jit.script
on a function to inspect source code and compile it as
TorchScript code.