Skip to content

Commit 3965c73

Browse files
committed
[Docs] Add a section to the docs to describe Glow Modules.
1 parent 7c178e8 commit 3965c73

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

docs/IR.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,27 @@ this graph in a direct translation of one operator to one node. It's a simple
1919
graph that allows basic transformations such as swapping the order of nodes and
2020
removing nodes. The graph is strongly typed, which means that inputs and output
2121
have a known tensor type (dimension and element type), and that the types must
22-
match. This compile has a debug method for dumping a graphical representation of
23-
the graph into a dotty file. The method is called 'dumpDAG'. The textual
24-
representation of the graph is less informative and it looks like this:
22+
match.
23+
24+
The Glow graph is structured as a Module that contains multiple functions that
25+
contain a multiple nodes. Variables, which are similar to global variables in C
26+
programs, are shared between the functions. Nodes inside functions are able to
27+
reference variables, which are owned by the module. The picture below depicts a
28+
module that contains two functions. One of the functions does the training of
29+
the weights, and the other function runs the inference.
30+
31+
![](module.png)
32+
33+
Glow functions contain nodes that represent the different operations of a neural
34+
network. The function owns the nodes and has access to the variables in the
35+
module. The picture below depicts a small part of a function.
36+
37+
![](nodes.png)
38+
39+
The compiler has a debug method for dumping a graphical representation of the
40+
graph into a dotty file. The method is called 'dumpDAG'. The pictures above were
41+
generated with this method. The textual representation of the graph is less
42+
informative and it looks like this:
2543

2644
```
2745
pool

docs/module.png

128 KB
Loading

docs/nodes.png

71.2 KB
Loading

0 commit comments

Comments
 (0)