pkg/cmsis-nn: add support to RIOT#13062
Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom Feb 14, 2020
Merged
Conversation
c7a3e89 to
555648a
Compare
benpicco
reviewed
Feb 11, 2020
555648a to
235264e
Compare
benpicco
reviewed
Feb 13, 2020
Contributor
benpicco
left a comment
There was a problem hiding this comment.
The example code might as well be black magic, but I see it was already as opaque in the original example.
I'm impressed by how fast it is even without any hardware acceleration.
| # Required for some basic math functions | ||
| INCLUDES += -I$(PKGDIRBASE)/cmsis-nn/CMSIS/DSP/Include | ||
|
|
||
| CFLAGS += -Wno-sign-compare |
Contributor
Author
There was a problem hiding this comment.
I kept this one and removed the other: the warning occurs in a header file and is not silenced from the package Makefile. So I have to silent it globally unfortunately.
235264e to
59aa103
Compare
Contributor
|
Looks good to me - please squash. |
benpicco
approved these changes
Feb 14, 2020
Contributor
benpicco
left a comment
There was a problem hiding this comment.
Package works fine with example faithfully converted from upstream C++ example.
59aa103 to
db7d8a5
Compare
Contributor
Author
|
Squashed! |
Contributor
Author
|
Thanks for reviewing and merging @benpicco ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR adds support for the neural network API provided by ARM in the CMSIS repository.
A test application is provided for performing the detection of an object in an RGB image from the CIFAR10 dataset. This sample application is adapted from the provided example in the upstream repo.
The image is embedded in the generated firmware using the BLOB mechanism.
Note that the package could have been done based on the existing cmsis-dsp but I wanted to use the latest release 5.6 and the existing cmsis-dsp is using 5.4 and doesn't seem to be that easy to update.
I already have a branch that does that but it's not working on all supported CortextM (like M0).
cc @emmanuelsearch, as we already talked about that before.
Testing procedure
The following command should succeed:
Issues/PRs references
None