Skip to content

Commit

Permalink
Add diagram for VM modules to c-api doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed Sep 1, 2023
1 parent 6995a66 commit 1909d90
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/website/docs/reference/bindings/c-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,6 @@ A _call_ (`iree_runtime_call_t`) is a stateful VM function call builder.

#### VM

<!-- TODO(scotttodd): VM module diagram (bytecode, HAL, custom) -->

IREE uses its own Virtual Machine (VM) at runtime to interpret program
instructions on the host system.

Expand All @@ -415,6 +413,29 @@ dense math into HAL command buffers that are dispatched to hardware backends.
access to hardware accelerators through the HAL. Compiled user programs are
also modules.

```mermaid
stateDiagram-v2
accTitle: Sample VM Modules
accDescr {
Bytecode modules contain program state, program functions, and debug
information.
HAL modules contain devices, executables, HAL functions, and HAL types.
Custom modules may contain external functions and custom types.
}
state "Bytecode module" as bytecode {
bytecode_contents: Module state<br>Program functions<br>Debug information
}
state "HAL module" as HAL {
hal_contents: Devices<br>Executables<br>HAL functions<br>HAL types
}
state "Custom module" as custom {
custom_contents: External functions<br>Custom types
}
```

#### HAL

<!-- TODO(scotttodd): command buffer construction -> dispatch diagram -->
Expand Down

0 comments on commit 1909d90

Please sign in to comment.