|
| 1 | +# Arm operator support documentation |
| 2 | + |
| 3 | +`generate_op_support.py` generates operator support tables for VGF, |
| 4 | +Ethos-U55, and Ethos-U85 from backend test definitions. It also checks |
| 5 | +static test coverage against backend support registries. |
| 6 | + |
| 7 | +Run the commands below from the ExecuTorch repository root, with the |
| 8 | +ExecuTorch and Arm development dependencies installed. |
| 9 | + |
| 10 | +## Generate support tables |
| 11 | + |
| 12 | +Generate the table for the backend you changed: |
| 13 | + |
| 14 | +```bash |
| 15 | +python backends/arm/scripts/docgen/generate_op_support.py --backend vgf |
| 16 | +python backends/arm/scripts/docgen/generate_op_support.py --backend u55 |
| 17 | +python backends/arm/scripts/docgen/generate_op_support.py --backend u85 |
| 18 | +``` |
| 19 | + |
| 20 | +The generated files are: |
| 21 | + |
| 22 | +- VGF: `docs/source/backends/arm-vgf/VGF_op_support.md` |
| 23 | +- Ethos-U55: `docs/source/backends/arm-ethos-u/U55_op_support.md` |
| 24 | +- Ethos-U85: `docs/source/backends/arm-ethos-u/U85_op_support.md` |
| 25 | + |
| 26 | +Review and commit the generated changes alongside the source changes. |
| 27 | +Do not edit the generated tables manually. |
| 28 | + |
| 29 | +## Check operator coverage |
| 30 | + |
| 31 | +Use `--check` to validate that backend-supported operator/profile pairs |
| 32 | +have the expected static test evidence: |
| 33 | + |
| 34 | +```bash |
| 35 | +python backends/arm/scripts/docgen/generate_op_support.py --backend vgf --check |
| 36 | +python backends/arm/scripts/docgen/generate_op_support.py --backend u55 --check |
| 37 | +python backends/arm/scripts/docgen/generate_op_support.py --backend u85 --check |
| 38 | +``` |
| 39 | + |
| 40 | +This checks test definitions; it does not execute the tests, regenerate |
| 41 | +the tables, or check whether committed tables are up to date. |
| 42 | + |
| 43 | +If coverage is missing, inspect the reported operator and profile, |
| 44 | +then add or correct the relevant backend test. Run the coverage check |
| 45 | +again and regenerate the table. |
| 46 | + |
| 47 | +## Generate a detailed report |
| 48 | + |
| 49 | +Use `--debug` to include exported operators and associated tests. |
| 50 | +Add `--html` to produce an HTML version alongside the Markdown report: |
| 51 | + |
| 52 | +```bash |
| 53 | +python backends/arm/scripts/docgen/generate_op_support.py \ |
| 54 | + --backend u85 \ |
| 55 | + --debug \ |
| 56 | + --html \ |
| 57 | + --output /tmp/U85_op_support_debug.md |
| 58 | +``` |
| 59 | + |
| 60 | +Replace `u85` with `vgf` or `u55` as needed. This example writes diagnostic |
| 61 | +reports to `/tmp` without replacing the committed support table. |
| 62 | + |
| 63 | +## GitHub Actions checks |
| 64 | + |
| 65 | +Pull request CI checks operator coverage and regenerates all three |
| 66 | +support tables to compare them with the committed versions. |
| 67 | + |
| 68 | +If CI reports outdated documentation, regenerate the tables: |
| 69 | + |
| 70 | +```bash |
| 71 | +for backend in vgf u55 u85; do |
| 72 | + python backends/arm/scripts/docgen/generate_op_support.py \ |
| 73 | + --backend "$backend" || break |
| 74 | +done |
| 75 | +``` |
| 76 | + |
| 77 | +Review the changes: |
| 78 | + |
| 79 | +```bash |
| 80 | +git diff -- \ |
| 81 | + docs/source/backends/arm-vgf/VGF_op_support.md \ |
| 82 | + docs/source/backends/arm-ethos-u/U55_op_support.md \ |
| 83 | + docs/source/backends/arm-ethos-u/U85_op_support.md |
| 84 | +``` |
| 85 | + |
| 86 | +Include the updated tables in your commit and push the changes. |
0 commit comments