-
Notifications
You must be signed in to change notification settings - Fork 685
Update XNNPACK doc structure and add template #14873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GregoryComer
wants to merge
2
commits into
pytorch:main
Choose a base branch
from
GregoryComer:new-backend-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+581
−227
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,6 @@ xcuserdata/ | |
/include/ | ||
/share/ | ||
/version.py | ||
*.csv | ||
*_etdump | ||
|
||
# Android | ||
|
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Backend Documentation Template | ||
|
||
This template provides a standardized structure and starting point for backend documentation. It is intended to provide a uniform experience for users while allowing for backends to customize their documentation as needed. | ||
|
||
## Template Structure | ||
|
||
The template includes the following files: | ||
|
||
### Required Pages | ||
|
||
- `backend-overview.md` - Main backend overview and introduction | ||
|
||
### Recommended Pages | ||
|
||
- `backend-quantization.md` - Quantization support and API documentation | ||
- `backend-partitioner.md` - Partitioner API reference | ||
- `op-support.csv` - Operator support data in CSV format | ||
|
||
### Optional Pages (and Subsections) | ||
|
||
- `backend-troubleshooting.md` - Common issues and troubleshooting guide | ||
- `backend-op-support.rst` - Operator support documentation (RST format) | ||
- `backend-arch-internals.md` - Architecture and internals documentation | ||
- `tutorials/backend-tutorials.md` - Tutorial sub-section | ||
- Use this sub-section to provide tutorials for your backend. | ||
- Tutorials should explain how a user can accomplish a task, in a step by step manner. | ||
- Some examples might include: | ||
- An end to end example of lowering and running a model on a specific platform. | ||
- `tutorials/backend-guides.md` - Guides sub-section | ||
- Use this sub-section to provide guides or how-tos for backend-specific functionality. | ||
- Guides should focus on providing information and building conceptual understanding, rather than giving step by step directions. | ||
- Some examples might include: | ||
- LLM attention management / static attention | ||
- Performance optimization guide | ||
|
||
## Using the Template | ||
|
||
To use this template for a new backend: | ||
|
||
1. Copy the entire `template` directory contents to your backend's documentation directory | ||
2. Rename files to match your backend name (e.g., `backend-overview.md` → `mybackend-overview.md`) | ||
3. Populate the content for your backend. | ||
|
||
### Additional Customization | ||
|
||
You may need to: | ||
- Add backend-specific sections to any file | ||
- Remove sections that don't apply to your backend | ||
- Update the operator support CSV with your backend's supported operators | ||
- Add backend-specific images or diagrams | ||
- Update cross-references and links | ||
|
||
Try to keep the landing page (`backend-overview.md`) simple and straigtforward. Use the child pages and sections to provide more detailed information. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# {BACKEND_NAME} Architecture and Internals | ||
|
||
This page covers internal implementation details of the backend, and is mainly aimed at contributors and heavy power users. This is an optional page for each backend and has no set structure. | ||
|
||
Some topics to consider: | ||
* High-level design of the backend | ||
* Details on the lowering flow | ||
* Internal debugging tools and techniques |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
================ | ||
Operator Support | ||
================ | ||
|
||
This page lists the operators supported by the {BACKEND_NAME} backend. Operators are the building blocks of the ML model. See `IRs <https://docs.pytorch.org/docs/stable/torch.compiler_ir.html>`_ for more information on the PyTorch operator set. | ||
|
||
{OPERATOR_SUPPORT_NOTES} | ||
|
||
.. csv-table:: Operator Support | ||
:file: op-support.csv | ||
:header-rows: 1 | ||
:widths: 20 15 30 30 | ||
:align: center |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.