Skip to content

Commit

Permalink
Update base for Update on "[aot] Serialize built graph, deserialize a…
Browse files Browse the repository at this point in the history
…nd run."

related: #4786

[Update]: based on an offline discussion with k-ye, I've split the
original `Graph` class into `GraphBuilder` and `CompiledGraph` classes
in C++. Note that the implementation didn't follow exactly the builder
design pattern as our builder is slightly simpler as shown below.
The complexity in our problem is more in the need of serialization and
deserialization for the same graph representation intead of its
construction process. So IMHO it's good enough to separate the
GraphBuilder and Runner(`CompiledGraph`) as we discussed. Please feel
free to correct me if I'm wrong!

```
GraphBuilder
    |
 compile()
    |
    |
CompiledGraph <----  serialize/deserialize ----> file
    |
    |
   run()
```

This PR demonstrates a minimal example of serializing a built graph,
deserializing and running it.

[ghstack-poisoned]
  • Loading branch information
ailzhang committed May 23, 2022
1 parent 2bfa5cb commit 562f379
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 562f379

Please sign in to comment.