Skip to content

Add AM62D Audio AI documentation (OS=edgeai) - #813

Open
junechul wants to merge 16 commits into
TexasInstruments:masterfrom
junechul:am62d-audioai
Open

junechul wants to merge 16 commits into
TexasInstruments:masterfrom
junechul:am62d-audioai

Conversation

@junechul

Copy link
Copy Markdown
Member

Summary

Adds a new Audio AI documentation set for AM62D (AM62DX). It builds with DEVFAMILY=AM62DX OS=edgeai.

What's included

New pages under source/devices/AM62DX/edgeai/:

  • Introduction & Overview: Audio AI on AM62D with the C7x NPU, plus a TVM + TIDL flow diagram. The workflow is framed as bring-your-own-model (BYOM).
  • Audio AI Model Zoo: on-target demos and the model zoo link.
  • Model Compile / Evaluate: compile and evaluate models with the TVM + TIDL flow.
  • Model Inspect: inspect compiled models.
  • Performance: benchmark tables (To be updated).

Supporting changes:

  • configs/AM62DX/AM62DX_edgeai_{config,tags,toc} for the new edgeai OS target.
  • A conf.py update.
  • Vale vocabulary additions in .github/styles/config/vocabularies/PSDK/accept.txt.
  • Diagram sources and exports in source/images/audioai/ (drawio, svg, png, export script).

Testing

  • Built locally with:
    docker run -it --rm -v "$PWD":/build ghcr.io/texasinstruments/processor-sdk-doc:latest make DEVFAMILY=AM62DX OS=edgeai

Notes

  • Only AM62DX/edgeai files and shared config entries are touched. Other devices are not affected.

@github-actions

Copy link
Copy Markdown

New warnings found with rstcheck:

source/devices/AM62DX/edgeai/performance.rst:68: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_VGGISH11__".
source/devices/AM62DX/edgeai/performance.rst:74: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_YAMNET__".
source/devices/AM62DX/edgeai/performance.rst:80: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GCRN__".
source/devices/AM62DX/edgeai/performance.rst:86: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/model_compile_evaluate.rst:67: (ERROR/3) Undefined substitution referenced: "__TIDLRUNNER_REPO_URL__".
source/devices/AM62DX/edgeai/model_compile_evaluate.rst:179: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_VGGISH11__".
source/devices/AM62DX/edgeai/model_compile_evaluate.rst:184: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_YAMNET__".
source/devices/AM62DX/edgeai/model_compile_evaluate.rst:189: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GCRN__".
source/devices/AM62DX/edgeai/model_compile_evaluate.rst:194: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/model_zoo.rst:38: (ERROR/3) Undefined substitution referenced: "__DATASET_AUDIO_CLS__".
source/devices/AM62DX/edgeai/model_zoo.rst:39: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_VGGISH11__".
source/devices/AM62DX/edgeai/model_zoo.rst:43: (ERROR/3) Undefined substitution referenced: "__DATASET_AUDIO_CLS__".
source/devices/AM62DX/edgeai/model_zoo.rst:44: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_YAMNET__".
source/devices/AM62DX/edgeai/model_zoo.rst:48: (ERROR/3) Undefined substitution referenced: "__DATASET_SPEECH_ENH__".
source/devices/AM62DX/edgeai/model_zoo.rst:49: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GCRN__".
source/devices/AM62DX/edgeai/model_zoo.rst:53: (ERROR/3) Undefined substitution referenced: "__DATASET_SPEECH_ENH__".
source/devices/AM62DX/edgeai/model_zoo.rst:54: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/model_zoo.rst:72: (ERROR/3) Undefined substitution referenced: "__MODELZOO_REPO_URL__".
source/devices/AM62DX/edgeai/model_zoo.rst:93: (ERROR/3) Undefined substitution referenced: "__TARGET_VENV_PATH__".
source/devices/AM62DX/edgeai/model_zoo.rst:164: (ERROR/3) Undefined substitution referenced: "__DATASET_AUDIO_CLS__".
source/devices/AM62DX/edgeai/model_zoo.rst:295: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_VGGISH11__".
source/devices/AM62DX/edgeai/model_zoo.rst:296: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_YAMNET__".
source/devices/AM62DX/edgeai/model_zoo.rst:297: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GCRN__".
source/devices/AM62DX/edgeai/model_zoo.rst:304: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/model_zoo.rst:307: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/introduction.rst:9: (ERROR/3) Undefined substitution referenced: "__AUDIOAI_SDK_VERSION__".
source/devices/AM62DX/edgeai/introduction.rst:65: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_VGGISH11__".
source/devices/AM62DX/edgeai/introduction.rst:70: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_YAMNET__".
source/devices/AM62DX/edgeai/introduction.rst:75: (ERROR/3) Undefined substitution referenced: "__DATASET_AUDIO_CLS__".
source/devices/AM62DX/edgeai/introduction.rst:80: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GCRN__".
source/devices/AM62DX/edgeai/introduction.rst:86: (ERROR/3) Undefined substitution referenced: "__MODEL_ID_GTCRN__".
source/devices/AM62DX/edgeai/introduction.rst:93: (ERROR/3) Undefined substitution referenced: "__DATASET_SPEECH_ENH__".

@github-actions

Copy link
Copy Markdown

New unreachable files found with check_files.py:

WARNING:root:File not used: source/images/audioai/export-diagrams.sh
WARNING:root:File not used: source/images/audioai/tvm_tidl_flow.png
WARNING:root:File not used: source/images/audioai/tvm_tidl_flow.drawio

@StaticRocket StaticRocket left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feels like it will be blocked by #740 as well, though the user did not tag the commits.

Additionally, review https://github.com/TexasInstruments/processor-sdk-doc?tab=contributing-ov-file#commit-types

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Acronyms are not allowed here

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.

Removed. accept.txt now only adds [Ss]ubgraphs?, logits?, perfsim and venv, which are the only entries Vale flagged. No acronyms.

Comment thread source/devices/AM62DX/edgeai/index.rst Outdated
Comment on lines +3 to +6
*********************************************
AM62D Audio AI Software Developer's Guide
*********************************************

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Done. The index title now uses #### (Section 1), and all pages follow the heading hierarchy in the contributing guide, with each adornment matching its title length.

Introduction & Overview
#######################

.. |tm| unicode:: U+2122

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our IT department is stupid so you can't access this link internally, but:

https://docutils.sourceforge.io/docs/ref/rst/definitions.html

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.

Thanks. Replaced the custom .. |tm| unicode:: U+2122 with .. include:: <isonum.txt> and |trade| in all four edgeai pages.

********************
Reference models
********************

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Title overhang

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.

Fixed. Every over/underline in the edgeai pages now has exactly the same length as its title.


The end-to-end path is the same for a reference model or your own model:

#. **Obtain an ONNX model** — a reference graph shipped with the AudioAI ModelZoo,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unnecessary unicode. See #726

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.

Replaced the em dashes and the division sign with ASCII (- and /). The edgeai .rst files are now ASCII-only.

into a dedicated Python 3.10 environment. The TIDL tools target Python 3.10.
These steps assume `pyenv <https://github.com/pyenv/pyenv>`__.

**1. Clone the repository** (|__TIDLRUNNER_REPO_URL__|):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use autonumbering

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.

Converted the hand-numbered steps to #. autonumbered lists, here and in model_zoo.rst.

Comment on lines +69 to +72
.. code-block:: console

$ git clone https://github.com/TexasInstruments/edgeai-tidlrunner.git
$ cd edgeai-tidlrunner

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indent content to fall under respective list item

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.

Done. Each step's paragraphs, code blocks and table are now indented 3 spaces under their list item.

Comment thread conf.py
OS = os.environ.get("OS", "")

# Audio AI docs prefix every shell command with a "$ " prompt symbol; strip it
# from the copy-button output so copied text is directly runnable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

I kept this scoped to the AM62DX edgeai build on purpose. A global copybutton_prompt_text would change copy behavior for every device doc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nope, we are not pulling this

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.

Removed from the PR. The file is no longer tracked.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use an svg or a graphviz graph definition. We are not pulling in an electron app for building documentation.

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.

Removed from the PR. The file is no longer tracked.

@StaticRocket StaticRocket left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feels like it will be blocked by #740 as well, though the user did not tag the commits.

Additionally, review https://github.com/TexasInstruments/processor-sdk-doc?tab=contributing-ov-file#commit-types

Signed-off-by: JuneChul Roh <jroh@ti.com>
Signed-off-by: JuneChul Roh <jroh@ti.com>
…M62D setup

Signed-off-by: JuneChul Roh <jroh@ti.com>
Audio AI docs prefix every shell command with "$ "; configure copybutton
to strip it so copied text is directly runnable.

Signed-off-by: JuneChul Roh <jroh@ti.com>
Signed-off-by: JuneChul Roh <jroh@ti.com>
…tion.

Signed-off-by: JuneChul Roh <jroh@ti.com>
…l zoo URL

Rename source/devices/AM62DX/audioai to edgeai and the AM62DX_audioai_*
config files to AM62DX_edgeai_*. Point __MODELZOO_REPO_URL__ and the
model zoo clone command to TexasInstruments/audioai-modelzoo.

Signed-off-by: JuneChul Roh <jroh@ti.com>
Split into "Model Compile and Evaluate" (model_compile_evaluate.rst) and
"Model Inspect" (model_inspect.rst). Update the toctree, the AM62DX edgeai
toc config, labels, and cross-references in the other pages.

Signed-off-by: JuneChul Roh <jroh@ti.com>
Trim the Vale vocabulary to the entries Vale needs, fix heading adornments and non-ASCII text, use isonum.txt and #. autonumbered steps, and replace the removed replacement variables with literal values.

Signed-off-by: JuneChul Roh <jroh@ti.com>
@junechul

Copy link
Copy Markdown
Member Author

@StaticRocket I have addressed most of your review comments. Please let me know if any further fix is required. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants