Skip to content

Start filling in bindings/c-api doc. - #5485

Merged
ScottTodd merged 9 commits into
iree-org:staging-docs-reworkfrom
ScottTodd:mkdocs-c-api
May 4, 2021
Merged

ScottTodd merged 9 commits into
iree-org:staging-docs-reworkfrom
ScottTodd:mkdocs-c-api

Conversation

@ScottTodd

@ScottTodd ScottTodd commented Apr 16, 2021 •

Copy link
Copy Markdown
Member

Progress on #5463

Preview: https://scotttodd.github.io/iree/bindings/c-api/

Code is modeled after simple_embedding.c, with some comments lifted from API header files and some changes from C++ test code to C sample code (see #5481 to clean that up).

@ScottTodd ScottTodd added documentation ✏️ Improvements or additions to documentation runtime/api IREE's public C runtime API and iree-run-module hal/api IREE's public C hardware abstraction layer API labels Apr 16, 2021
@ScottTodd
ScottTodd requested a review from benvanik April 16, 2021 18:46
@google-cla google-cla Bot added the cla: yes label Apr 16, 2021
Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment on lines +175 to +183
<!-- TODO(scotttodd): I/O buffers (TODO pending new helpers) -->
<!-- TODO(scotttodd): iree_vm_invoke -->

``` c
// (Program-specific I/O buffer setup, making data available to the device)

IREE_CHECK_OK(iree_vm_invoke(context, main_function,
/*policy=*/nullptr, inputs, outputs,
iree_allocator_system()));

// (Program-specific output buffer retrieval and reading back from the device)
```

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ScottTodd

Copy link
Copy Markdown
Member Author

ಠ_ಠ yamllint

Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved
@KoolJBlack

Copy link
Copy Markdown
Contributor

This CL is really helpful in understanding IREE's runtime. I have 2 general comments:

  1. Would be great to have the "VM" and "HAL" sections filled in as you've already noted.
  2. I would add a section that features something similar to one of @benvanik pretty diagrams. Getting to see the relation between the VM running code on the host machine/CPU and dispatching calls to the remote device would be extremely informative. I'd put that up top before the explanations that dig into the nitty gritty details.

Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved

@benvanik benvanik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved
Comment thread mkdocs/docs/bindings/c-api.md Resolved
@ScottTodd
ScottTodd merged commit c761959 into iree-org:staging-docs-rework May 4, 2021
@ScottTodd
ScottTodd deleted the mkdocs-c-api branch May 4, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation ✏️ Improvements or additions to documentation hal/api IREE's public C hardware abstraction layer API runtime/api IREE's public C runtime API and iree-run-module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants