|
| 1 | +# PyTorch Glossary |
| 2 | + |
| 3 | +- [PyTorch Glossary](#pytorch-glossary) |
| 4 | +- [Operation and Kernel](#operation-and-kernel) |
| 5 | + - [ATen](#aten) |
| 6 | + - [Operation](#operation) |
| 7 | + - [Native Operation](#native-operation) |
| 8 | + - [Custom Operation](#custom-operation) |
| 9 | + - [Kernel](#kernel) |
| 10 | + - [Compound Operation](#compound-operation) |
| 11 | + - [Composite Operation](#composite-operation) |
| 12 | + - [Non-Leaf Operation](#non-leaf-operation) |
| 13 | + - [Leaf Operation](#leaf-operation) |
| 14 | + - [Device Kernel](#device-kernel) |
| 15 | + - [Compound Kernel](#compound-kernel) |
| 16 | +- [JIT Compilation](#jit-compilation) |
| 17 | + - [JIT](#jit) |
| 18 | + - [TorchScript](#torchscript) |
| 19 | + - [Tracing](#tracing) |
| 20 | + - [Scripting](#scripting) |
| 21 | + |
| 22 | +# Operation and Kernel |
| 23 | + |
| 24 | +## ATen |
| 25 | +Short for "A Tensor Library". The foundational tensor and mathematical |
| 26 | +operation library on which all else is built. |
| 27 | + |
| 28 | +## Operation |
| 29 | +A unit of work. For example, the work of matrix multiplication is an operation |
| 30 | +called aten::matmul. |
| 31 | + |
| 32 | +## Native Operation |
| 33 | +An operation that comes natively with PyTorch ATen, for example aten::matmul. |
| 34 | + |
| 35 | +## Custom Operation |
| 36 | +An Operation that is defined by users and is usually a Compound Operation. |
| 37 | +For example, this |
| 38 | +[tutorial](https://pytorch.org/docs/stable/notes/extending.html) details how |
| 39 | +to create Custom Operations. |
| 40 | + |
| 41 | +## Kernel |
| 42 | +Implementation of a PyTorch operation, specifying what should be done when an |
| 43 | +operation executes. |
| 44 | + |
| 45 | +## Compound Operation |
| 46 | +A Compound Operation is composed of other operations. Its kernel is usually |
| 47 | +device-agnostic. Normally it doesn't have its own derivative functions defined. |
| 48 | +Instead, AutoGrad automatically computes its derivative based on operations it |
| 49 | +uses. |
| 50 | + |
| 51 | +## Composite Operation |
| 52 | +Same as Compound Operation. |
| 53 | + |
| 54 | +## Non-Leaf Operation |
| 55 | +Same as Compound Operation. |
| 56 | + |
| 57 | +## Leaf Operation |
| 58 | +An operation that's considered a basic operation, as opposed to a Compound |
| 59 | +Operation. Leaf Operation always has dispatch functions defined, usually has a |
| 60 | +derivative function defined as well. |
| 61 | + |
| 62 | +## Device Kernel |
| 63 | +Device-specific kernel of a leaf operation. |
| 64 | + |
| 65 | +## Compound Kernel |
| 66 | +Opposed to Device Kernels, Compound kernels are usually device-agnostic and belong to Compound Operations. |
| 67 | + |
| 68 | +# JIT Compilation |
| 69 | + |
| 70 | +## JIT |
| 71 | +Just-In-Time Compilation. |
| 72 | + |
| 73 | +## TorchScript |
| 74 | +An interface to the TorchScript JIT compiler and interpreter. |
| 75 | + |
| 76 | +## Tracing |
| 77 | +Using `torch.jit.trace` on a function to get an executable that can be optimized |
| 78 | +using just-in-time compilation. |
| 79 | + |
| 80 | +## Scripting |
| 81 | +Using `torch.jit.script` on a function to inspect source code and compile it as |
| 82 | +TorchScript code. |
0 commit comments