From 1909d901e4ac3bf9f05548f254b4a823b50dc5f5 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Fri, 1 Sep 2023 14:53:52 -0700 Subject: [PATCH] Add diagram for VM modules to c-api doc. --- docs/website/docs/reference/bindings/c-api.md | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/website/docs/reference/bindings/c-api.md b/docs/website/docs/reference/bindings/c-api.md index cc827e5413ec..891f2ff425eb 100644 --- a/docs/website/docs/reference/bindings/c-api.md +++ b/docs/website/docs/reference/bindings/c-api.md @@ -391,8 +391,6 @@ A _call_ (`iree_runtime_call_t`) is a stateful VM function call builder. #### VM - - IREE uses its own Virtual Machine (VM) at runtime to interpret program instructions on the host system. @@ -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
Program functions
Debug information + } + + state "HAL module" as HAL { + hal_contents: Devices
Executables
HAL functions
HAL types + } + + state "Custom module" as custom { + custom_contents: External functions
Custom types + } + ``` + #### HAL