docs: Add EP-aware model building documentation - #117
Merged
Conversation
- Create docs/ep_quickstart.md: 5-section practical guide (build for a
specific EP, trace mode, query ep_registry, register a custom EP,
common EP configurations table)
- Expand docs/execution_providers.md:
- New 'When to use build_context() vs optimize_model() directly'
section with summary table of API entry points
- Clarify Step 2 of 'Adding a New EP': both rewrite-rule and
generation-time (ep_capabilities()) approaches documented
- README.md: Add EP-aware optimization paragraph with code examples
and links to the quickstart and full reference docs
All new content is derived from reading the source code (PR #103,
now merged). No speculative or inaccurate information added.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds documentation for mobius’ execution-provider (EP) aware build + optimization pipeline, including a new quickstart guide and expanded reference docs, and updates the README to point users at the EP workflow.
Changes:
- Added a new practical guide:
docs/ep_quickstart.md(common EP workflows: build, trace, query/register EPs). - Expanded
docs/execution_providers.mdwith guidance on when to usebuild()/build_from_module()vsbuild_context()vsoptimize_model(), and clarified EP extension approaches. - Updated
README.mdto introduce EP-aware optimization and link to the new documentation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| README.md | Adds an EP-aware optimization intro + Python examples + doc links. |
| docs/execution_providers.md | Adds an API decision guide and clarifies EP extension guidance. |
| docs/ep_quickstart.md | New “under 3 minutes” guide for EP-aware building tasks and examples. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Export EpCapabilities, ep_registry, register_ep, get_ep, and optimize_model from mobius.__init__ so users don't need to import from private submodules. Update docs/ep_quickstart.md and docs/execution_providers.md to use public imports throughout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
- Trace examples: Stage 2 shows 5 rule groups (not 4) for CUDA/f16/decoder; add missing PackQKV stage with correct node counts verified from real optimize_model() trace output (Qwen3 2-layer model, scaled to 1B/3B) - EpCapabilities reference: add 2 missing fields (supports_fused_matmul, supports_packed_multi_head_attention) with correct descriptions - default_int4_accuracy_level comment: '0 = no INT4' → '0 = highest accuracy' to match the actual docstring semantics (0 = most accurate, 4 = fastest) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
- README.md: use build() directly (from mobius import build) instead of mobius.build() - execution_providers.md: add 'import onnx_ir as ir' to all code snippets using ir.DataType - execution_providers.md: fix test file reference _common_test.py -> src/mobius/_build_context_test.py - ep_quickstart.md: fix wording 'at optimization time' -> 'during build-time validation, before graph construction or optimization starts' - ep_quickstart.md: fix 'No vendor-specific ops' -> 'No EP-specific vendor fusions (e.g. no GQA/PackQKV)' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the EP-aware model building infrastructure added in PR #103.
Changes
New:
docs/ep_quickstart.mdPractical 5-section guide for the most common EP tasks:
ep_registry,get_ep())register_ep())Updated:
docs/execution_providers.mdbuild_context()vsoptimize_model()directly" section with a summary table of all API entry points (build(),build_from_module(),optimize_model(),build_context())ep_capabilities()approach (for component-level branching)Updated:
README.mdAccuracy note
All content is derived directly from reading the source code. Docstrings for
EpCapabilities,EpRegistry,build_context(),optimize_model(), andbuild()were verified and are already comprehensive — no docstring changes needed.