'Does TensorFlow Lite for Microcontrollers support Google Edge TPU?

I already know that TensorFlow Lite (TFL) supports the Google Edge TPU, for instance through the Coral Dev Board (Linux required).

However I'd like to know whether TensorFlow Lite for Microcontrollers (TFLM) is compatible as well.

What I want to do is design a bare-metal (no OS, so no Python etc.) Embedded System with a Cortex-M microcontroller and use the TPU to accelerate an image classifier using TFLM.

Apparently there's a similar system from Google, the Dev Board Micro, which mounts a Cortex-M and according to the product description "Supports TensorFlow Lite and TensorFlow Lite for Microcontrollers". But unfortunately it's still "coming soon" and I don't find any other useful info or similar projects online. Being an official product I assume TFLM should support the Edge TPU but I don't understand whether it's already supported now or maybe it will be in the future only when the Dev Board Micro is released.

I tried to have a look at the GitHub repo of TFLM and at the line 56 I found this:

kTfLiteEdgeTpuContext = 2,     // Placeholder for Edge TPU support.

I was planning to use the same MCU (i.MX RT1170) as the Dev Board Micro and apparently NXP has its own version (hard fork?) of TFLM.

Thank you!



Solution 1:[1]

Yes, Dev board micro supports TFLM models. you can run TFLM models on edgeTPU. Thanks!

Solution 2:[2]

Tensorflows support TPU, what type of processor unit do you require you can specify.

https://www.tensorflow.org/guide/tpu

Input and Output:

>>> import tensorflow as tf
>>> physical_devices = tf.config.experimental.list_physical_devices('TPU')
>>> print(physical_devices)
[]
>>> physical_devices = tf.config.experimental.list_physical_devices('GPU')
>>> print(physical_devices)
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
>>>

Sample

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Coral So Support
Solution 2 Martijn Pieters