ARM-software / CMSIS_5

CMSIS Version 5 Development Repository
http://arm-software.github.io/CMSIS_5/index.html
Apache License 2.0
1.34k stars 1.08k forks source link

Difference between q and s data types #1356

Closed fpedd closed 3 years ago

fpedd commented 3 years ago

I am just getting started with CMSIS NN and stumbled upon functions with similar names but different endings, specifically *_q{7,15} vs *_s{8,16}. Both appear to be using the q{7,15,31} fixed-point data types. What is the difference between the q and s versions? Is it just naming convention/legacy, or is there more to it? Tensorflow appears to be using only the s variant.

felix-johnny commented 3 years ago

@fabianpedd Thanks for the question. The differences are listed in https://github.com/ARM-software/CMSIS_5/tree/develop/CMSIS/NN#legacy-vs-tfl-micro-compliant-apis . There is more to it than naming convention and the current supported ones are the ones with _s in the name that support the int8/16 spec of TensorFlow Lite for Microcontrollers.

felix-johnny commented 3 years ago

You could have a look at the blog https://community.arm.com/arm-community-blogs/b/ai-and-ml-blog/posts/image-recognition-on-arm-powered-microcontrollers on how to get started..

fpedd commented 3 years ago

@felix-johnny thank you.