Update boxing/unboxing graphic

Sebastian Messmer
2021-01-05 19:32:57 -08:00
parent 66a1ad5f3c
commit 65019a0fe4
3 changed files with 878 additions and 2 deletions

@ -53,7 +53,7 @@ Having both paradigms also means we need to build a bridge. This is where “box
The following diagram shows a high level overview of how these pieces interconnect.
![Boxing/Unboxing Architecture Overview](/pytorch/pytorch/wiki/images/Boxing-and-Unboxing-in-the-PyTorch-Operator-Library-2.svg)
![Boxing/Unboxing Architecture Overview](/pytorch/pytorch/wiki/images/Boxing-and-Unboxing-in-the-PyTorch-Operator-Library-3.svg)
1. The boxed op calling API takes an operator name and a stack of IValues and calls that operator. It is used from the mobile lite interpreter, when a caffe2 model calls a PyTorch op, and when backends like lazy or AMP re-dispatch an operator. Starting with [https://github.com/pytorch/pytorch/pull/36838](https://github.com/pytorch/pytorch/pull/36838), it is also used by JIT to call ops.
2. Given a stack of IValues, boxed dispatch iterates over the IValues that are arguments for the current operator call, finds the Tensor arguments, constructs the dispatch key from those arguments, and finds the operator implementation function pointer that should be called for this dispatch key.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 230 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 163 KiB