Tape Machine (#30)

Adds a tape machine way of executing the code.
The tape machine is a series of FunctionCall objects, which can either be called one by one, or be used to generate expressions to make up a function.

Reviewed-on: Rubydragon/MetagraphOptimization.jl#30
Co-authored-by: Anton Reinhard <anton.reinhard@proton.me>
Co-committed-by: Anton Reinhard <anton.reinhard@proton.me>
This commit is contained in:
2024-01-03 16:38:32 +01:00
committed by Anton Reinhard
parent 92e0eeaaef
commit 82ed774b7e
21 changed files with 398 additions and 502 deletions

View File

@ -1,8 +1,23 @@
# Code Generation
## Main
## Types
```@autodocs
Modules = [MetagraphOptimization]
Pages = ["code_gen/main.jl"]
Pages = ["code_gen/type.jl"]
Order = [:type, :constant, :function]
```
## Function Generation
Implementations for generation of a callable function. A function generated this way cannot immediately be called. One Julia World Age has to pass before this is possible, which happens when the global Julia scope advances. If the DAG and therefore the generated function becomes too large, use the tape machine instead, since compiling large functions becomes infeasible.
```@autodocs
Modules = [MetagraphOptimization]
Pages = ["code_gen/function.jl"]
Order = [:function]
```
## Tape Machine
```@autodocs
Modules = [MetagraphOptimization]
Pages = ["code_gen/tabe_machine.jl"]
Order = [:function]
```

View File

@ -7,6 +7,13 @@ Pages = ["scheduler/interface.jl"]
Order = [:type, :function]
```
## Types
```@autodocs
Modules = [MetagraphOptimization]
Pages = ["scheduler/type.jl"]
Order = [:type, :function]
```
## Greedy
```@autodocs
Modules = [MetagraphOptimization]

View File

@ -34,10 +34,3 @@ Modules = [MetagraphOptimization]
Pages = ["task/properties.jl"]
Order = [:function]
```
## Print
```@autodocs
Modules = [MetagraphOptimization]
Pages = ["task/print.jl"]
Order = [:function]
```