.. |br| raw:: html
.. _coral-guide-index:
Coral Edge TPU Guide
====================
Using a Coral Edge TPU accelerator (Mini PCIe) on our modules for on-device AI inference.
For running ML models on the SoC's internal NPU see the
:doc:`Machine Learning Guide `.
Introduction
------------
.. figure:: images/coral_overview.jpg
:scale: 20 %
:align: right
:figwidth: 40%
*Coral helps you bring on-device AI application ideas from prototype to production.
They offer a platform of hardware components, software tools, and pre-compiled models for building devices with local AI.* -
`coral.ai `_
|br|
The Coral Mini PCIe accelerator can be attached to our **QSBASE3** baseboard, meaning **QSXM** and **QSXP** modules - see the `Coral PCIe accelerator `_ and the :doc:`Add-on Devices ` compatibility list.
Image
-----
You have two options using it: |br|
- Download the ``karo-image-ml`` fitting your module from our `Download Area `_.
- To compile the image yourself follow the :doc:`Yocto Guide ` and compile ``karo-image-ml`` (see also the :doc:`Machine Learning Guide `).
Setup
-----
1. Mount the Coral PCIe module to our QSBASE3 baseboard:
.. figure:: images/coral_installed.jpg
:scale: 20 %
:align: right
:figwidth: 40%
Enabling PCIe
-------------
**PCIe has to be enabled** for the Mini PCIe slot on QSBASE3. Load the matching FDT overlay
in the U-Boot environment (see :doc:`Devicetree Overlays `):
.. list-table::
:header-rows: 1
* - Module on QSBASE3
- FDT overlay
* - QSXM
- ``qsxm-pcie``
* - QSXP
- ``qsxp-pcie``
E.g. for a QSXP module:
.. prompt::
:prompts: U-Boot>
setenv overlays_qsbase3 ${overlays_qsbase3} qsxp-pcie
saveenv
reset
User Space
----------
For using the Edge TPU from user space — installing the PyCoral library and running a model
on the TPU with ``karo-image-ml`` — see :ref:`ml-coral-edgetpu` in the
:doc:`Machine Learning Guide `.