Skip to content

AM62A edgeai docs support #286

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
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
device: AM64X
- os: debian
device: AM62LX
- os: edgeai
device: AM62AX

steps:
- name: Checkout
Expand Down
42 changes: 42 additions & 0 deletions configs/AM62AX/AM62AX_edgeai_config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# General family replacement variables and configuration values for Linux build

# This file is processed by Python scripts to define both replacement
# variable and configuration values for a device family build.
# For replacement variables, all variables should be listed on a single
# line, and all the variables should be listed on consecutive lines
# (i.e. no additional blank lines between the replacement variables).
# Similarly, all the configuration values should be listed on individual,
# consecutive lines (with no blank linues between the configuration values).
#
# Note that neither replacement variables nor configuration values may contain
# a colon (i.e. ":") in their name. However, values may contain colons.

Replacement Variables
---------------------
'__PART_FAMILY_NAME__' : 'AM62Ax'
'__PART_FAMILY_DEVICE_NAMES__' : 'AM62Ax'
'__PRODUCT_LINE_NAME__' : 'Sitara MPU'
'__SDK_BUILD_MACHINE__' : 'am62a-sk'
'__SDK_FULL_NAME__' : 'Processor SDK Linux Edge AI AM62Ax'
'__SDK_SHORT_NAME__' : 'PSDK EdgeAI'
'__SDK_INSTALL_FILE__' : 'ti-processor-sdk-linux-edgeai-am62a-evm-<version>-Linux-x86-Install.bin'
'__SDK_INSTALL_DIR__' : 'ti-processor-sdk-linux-edgeai-am62a-evm-<version>'
'__SDK_DOWNLOAD_URL__' : '`Processor SDK AM62A Download Page <https://www.ti.com/tool/PROCESSOR-SDK-AM62A>`__'
'__LINUX_UBUNTU_VERSION_LONG__' : '22.04 (64-bit)'
'__LINUX_UBUNTU_VERSION_SHORT__' : '22.04'
'__OPTEE_PLATFORM_FLAVOR__' : 'am62axx'
'__RTOS_UBUNTU_VERSION_LONG__' : '22.04 (64-bit)'
'__WINDOWS_SUPPORTED_LONG__' : '10 (64-bit)'
'__FEATURINGMATRIX__' : \
'__SYSFW_CORE_NAME__' : 'TIFS'

Configuration Values
--------------------
'CONFIG_part_family' : 'AM62AX_family'
'CONFIG_part_variant' : 'AM62AX'
'CONFIG_sdk' : 'PLSDK'
'CONFIG_icss_support' : 'yes'
'CONFIG_rt_linux_support' : 'yes'
'CONFIG_gpu_ip' : 'Rogue_AXE'
'CONFIG_crypto' : 'sa2ul'

9 changes: 9 additions & 0 deletions configs/AM62AX/AM62AX_edgeai_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Device Family name
fam_name = 'AM62AX'

# Project name and HTML title
project = u'Processor SDK Linux Edge AI for AM62Ax'
html_title = 'Processor SDK AM62Ax Documentation'

# The master toctree document.
master_doc = 'devices/AM62AX/edgeai/index'
18 changes: 18 additions & 0 deletions configs/AM62AX/AM62AX_edgeai_toc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
devices/AM62AX/edgeai/datasheet_optiflow
devices/AM62AX/edgeai/datasheet_tiovx_apps
devices/AM62AX/edgeai/connectivity
devices/AM62AX/edgeai/pi_hdr_programming
devices/AM62AX/edgeai/faq
devices/AM62AX/edgeai/getting_started
devices/AM62AX/edgeai/index
devices/AM62AX/edgeai/test_report
devices/AM62AX/edgeai/release_notes

edgeai/sdk_overview
edgeai/configuration_file
edgeai/edgeai_dataflows
edgeai/inference_models
edgeai/sample_apps
edgeai/measure_perf
edgeai/docker_environment
edgeai/sdk_components
8 changes: 8 additions & 0 deletions source/devices/AM62AX/edgeai/connectivity.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
============================
Connectivity and Peripherals
============================

.. toctree::
:maxdepth: 2

pi_hdr_programming
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Model Name,A53 Load (%),mcu1_0,C7x Load (%), VISS (%), LDC , BLNF, MSC_0 (%), MSC_1 (%), DOF , SDE , GPU , VISS (%), LDC , BLNF, MSC_0 (%), MSC_1 (%), DOF , SDE , GPU ,DDR Read BW (MB/s),DDR Read Peak BW (MB/s),DDR Write BW (MB/s),DDR Write Peak BW (MB/s),DDR Total BW (MB/s),DDR Total Peak BW (MB/s),temp_thermal_zone0(DDR),temp_thermal_zone1(CPU),temp_thermal_zone2(C7x),FPS
ONR-CL-6360-regNetx-200mf,11.57,2.99,15.42,18.17,0.00,0.00,26.71,13.89,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,760,760,336,336,1096,1096,53.91,46.79,47.92,33
ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416,9.59,2.88,26.91,17.80,0.00,0.00,26.17,14.49,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,943,943,401,401,1344,1344,53.91,46.12,46.79,30
TFL-CL-0000-mobileNetV1-mlperf,9.26,2.98,12.99,17.73,0.00,0.00,26.05,13.18,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,704,704,326,326,1030,1030,53.03,46.12,47.47,30
TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320,7.56,2.90,40.47,17.86,0.00,0.00,26.26,13.94,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,941,941,399,399,1340,1340,53.91,47.02,47.02,30
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Model Name,A53 Load (%),mcu1_0,C7x Load (%), VISS (%), LDC , BLNF, MSC_0 (%), MSC_1 (%), DOF , SDE , GPU , VISS (%), LDC , BLNF, MSC_0 (%), MSC_1 (%), DOF , SDE , GPU ,DDR Read BW (MB/s),DDR Read Peak BW (MB/s),DDR Write BW (MB/s),DDR Write Peak BW (MB/s),DDR Total BW (MB/s),DDR Total Peak BW (MB/s),temp_thermal_zone0(DDR),temp_thermal_zone1(CPU),temp_thermal_zone2(C7x),FPS
ONR-CL-6360-regNetx-200mf,20.00,3.47,29.47,0.00,0.00,0.00,24.80,25.32,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1169,1169,490,490,1659,1659,52.81,45.21,46.12,60
ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416,15.71,2.93,54.93,0.00,0.00,0.00,25.17,23.31,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1560,1560,618,618,2178,2178,50.38,42.23,44.07,60
TFL-CL-0000-mobileNetV1-mlperf,19.39,3.45,26.05,0.00,0.00,0.00,25.12,25.61,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1110,1110,486,486,1596,1596,52.59,45.66,46.79,60
TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320,13.13,3.16,81.96,0.00,0.00,0.00,25.15,23.56,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1559,1559,617,617,2176,2176,52.81,44.30,46.12,60
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Model Name,MPU Load (%) ,C7x_0 Load (%) , VISS Load (%) , MSC0 Load (%) , MSC1 Load (%) ,DDR Read BW (MB/s),DDR Write BW (MB/s),DDR Total BW (MB/s),FPS,Inference time (ms),
ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416, 3.20, 27.01, 17.32, 38.67, 14.86, 934, 436, 1370, 30, 8.895
TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320, 4.12, 40.69, 17.31, 38.65, 14.25, 946, 442, 1388, 30, 13.434
ONR-CL-6360-regNetx-200mf, 4.34, 14.70, 17.32, 38.62, 13.53, 697, 354, 1051, 30, 4.803
TFL-CL-0000-mobileNetV1-mlperf, 4.12, 13.10, 17.32, 38.63, 13.54, 678, 359, 1037, 30, 4.269
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Model Name,MPU Load (%) ,C7x_0 Load (%) , MSC0 Load (%) , MSC1 Load (%) ,DDR Read BW (MB/s),DDR Write BW (MB/s),DDR Total BW (MB/s),FPS,Inference time (ms),
ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416, 9.82, 54.55, 52.47, 24.12, 1546, 743, 2289, 60, 8.985
TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320, 7.28, 82.35, 49.82, 23.77, 1566, 757, 2323, 60, 13.618
ONR-CL-6360-regNetx-200mf, 5.65, 29.29, 65.78, 26.15, 1081, 592, 1673, 60, 4.788
TFL-CL-0000-mobileNetV1-mlperf, 8.58, 26.08, 65.46, 26.14, 1050, 605, 1655, 60, 4.251
50 changes: 50 additions & 0 deletions source/devices/AM62AX/edgeai/datasheet_optiflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
====================
Datasheet (Optiflow)

Check warning on line 2 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'Datasheet (Optiflow)'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'Datasheet (Optiflow)'.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 2, "column": 1}}}, "severity": "INFO"}

Check warning on line 2 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'Datasheet'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'Datasheet'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 2, "column": 1}}}, "severity": "WARNING"}

Check failure on line 2 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.TermsErrors] Use 'data sheet' rather than 'Datasheet'. Raw Output: {"message": "[RedHat.TermsErrors] Use 'data sheet' rather than 'Datasheet'.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 2, "column": 1}}}, "severity": "ERROR"}

Check warning on line 2 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'Optiflow'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'Optiflow'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 2, "column": 12}}}, "severity": "WARNING"}
====================

The performance measurements includes the following,

#. **FPS** : Effective framerate at which the application runs

Check warning on line 7 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'FPS') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'FPS') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 7, "column": 6}}}, "severity": "INFO"}

Check warning on line 7 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'framerate'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'framerate'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 7, "column": 24}}}, "severity": "WARNING"}
#. **Total time** : Average time taken to process each frame, which includes
pre-processing, inference and post-processing time
#. **Inference time** : Average time taken to infer each frame
#. **CPU loading** : Loading on different CPU cores present
#. **DDR BW** : DDR read and write BW used

Check warning on line 12 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'DDR') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'DDR') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 12, "column": 6}}}, "severity": "INFO"}

Check warning on line 12 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'DDR') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'DDR') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 12, "column": 17}}}, "severity": "INFO"}
#. **HWA Loading** : Loading on different Hardware accelerators present

Check warning on line 13 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'HWA') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'HWA') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 13, "column": 6}}}, "severity": "INFO"}

Following are the latest performance numbers of the OpTIFlow demos:

Source : **Video**

Check warning on line 17 in source/devices/AM62AX/edgeai/datasheet_optiflow.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'Source : Video'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'Source : Video'.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_optiflow.rst", "range": {"start": {"line": 17, "column": 1}}}, "severity": "INFO"}
==============================

| Resolution : **1280x768**
| Encoding : **h264**
|

.. figure:: ../../../images/edgeai/datasheet_optiflow_pipeline1.png
:scale: 75
:align: center

GStreamer based data-flow pipeline with video file input source and display output

.. csv-table::
:file: datasheet/optiflow/optiflow_video_am62a.csv
:header-rows: 1

Source : **CSI Camera with VISS (imx219)**
======================================================

| Capture Framerate : **30 fps**
| Resolution : **1920x1080**
| format : **SRGGB8**
|

.. figure:: ../../../images/edgeai/datasheet_optiflow_pipeline2.png
:scale: 75
:align: center

GStreamer based data-flow pipeline with IMX219 sensor, ISP and display

.. csv-table::
:file: datasheet/optiflow/optiflow_camera_am62a.csv
:header-rows: 1
38 changes: 38 additions & 0 deletions source/devices/AM62AX/edgeai/datasheet_tiovx_apps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
======================
Datasheet (TIOVX Apps)

Check failure on line 2 in source/devices/AM62AX/edgeai/datasheet_tiovx_apps.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.TermsErrors] Use 'data sheet' rather than 'Datasheet'. Raw Output: {"message": "[RedHat.TermsErrors] Use 'data sheet' rather than 'Datasheet'.", "location": {"path": "source/devices/AM62AX/edgeai/datasheet_tiovx_apps.rst", "range": {"start": {"line": 2, "column": 1}}}, "severity": "ERROR"}
======================

The performance measurements includes the following,

#. **FPS** : Effective framerate at which the application runs
#. **Total time** : Average time taken to process each frame, which includes
pre-processing, inference and post-processing time
#. **Inference time** : Average time taken to infer each frame
#. **CPU loading** : Loading on different CPU cores present
#. **DDR BW** : DDR read and write BW used
#. **HWA Loading** : Loading on different Hardware accelerators present

Following are the latest performance numbers of the edgeai-tiovx-apps:

Source : **Video**
==============================

| Resolution : **1280x768**
| Encoding : **h264**
|

.. csv-table::
:file: datasheet/tiovx-apps/tiovx_apps_video_am62a.csv
:header-rows: 1

Source : **CSI Camera with VISS (imx219)**
======================================================

| Capture Framerate : **30 fps**
| Resolution : **1920x1080**
| format : **SRGGB8**
|

.. csv-table::
:file: datasheet/tiovx-apps/tiovx_apps_camera_am62a.csv
:header-rows: 1
53 changes: 53 additions & 0 deletions source/devices/AM62AX/edgeai/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _pub_edgeai_FAQs:

====
FAQs
====

.. _pub_edgeai_multiple_usb_cams:

Getting Error when trying to capture from multiple USB cameras simultaneously
=============================================================================

This is a common issue faced in the industry with many USB cameras.
You may get errors like ``Failed to allocate required memory.`` when tying to
capture simultaneously from more than one usb cameras.

The root cause for this issue is that most of the USB cameras requests for more
BW than actually required. If the use case is to capture only from 2 USB cameras
, it can be done by connecting one of them to USB type-C port since it is
internally connected to a separate instance of USB controller. But if the use
case is to capture from more than 2 cameras, you need to modify the UVC driver
to override the BW allocation.

The root cause and work around is explained in detail in this
blog `Multiple UVC cameras on linux <https://www.thegoodpenguin.co.uk/blog/multiple-uvc-cameras-on-linux>`_

To apply the work around to our SDK, use below steps

#. Download and install `Processor SDK Linux <https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/devices/AM62AX/linux/Overview/Download_and_Install_the_SDK.html>`__
#. Get the patch to add `bandwidth_cap` parameter to `uvcvideo` kernel module `uvcvideo patch <https://www.spinics.net/lists/linux-media/msg175596.html>`_
#. Apply the patch to kernel source in Processor SDK Linux Install path. Please refer to `PSDK building kernel <https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#overview>`_
#. Compile only `uvcvideo` module using below command

.. code-block:: bash

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- am62ax_evm_a53_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ./drivers/media/usb/uvc/uvcvideo.ko
#. Copy `./drivers/media/usb/uvc/uvcvideo.ko` to sk
#. Remove `uvcvideo` module and install modified version using below commands

.. code-block:: bash

rmmmod uvcvideo
insmod uvcvideo.ko
#. Set the desired BW cap as shown below

.. code-block:: bash

echo 1200 > /sys/module/uvcvideo/parameters/bandwidth_cap

.. note::

The unit of BW here is Bytes/125us, you can estimate the approximate BW
requirement by multiplying fps with size/frame
Loading
Loading