Open
Conversation
* Added test cases for pulp_matmul_fp32 * Fixed one bug
Fixed a few bugs mainly related to bias support Moved project.yml one directory up to support correct gcovr report generation. Updated test pmsis.h with DMA stuff Also fixed bias support for pulp_fp32_linear.c, no test cases yet!
Also introduced test_utils.c for common unittest functions Refactored pulp_matmul_fp32 tests with conditional test cases
Moved test vectors to static global variables, which shortens the test cases itself
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.
The current test cases in the
testsfolder are difficult to run (need pulp device or simulator) and have a low code coverage (~30%). Each test needs separate compilation flags and manual verification which makes this way of testing unsustainable.To safeguard the integrity of the entire codebase, a set of unittests that can easily be ran with automatic checks are desperately needed.
I started creating a test suite using the embedded friendly Unity and ceedling testing tools. These tools also allow to test embedded code on an x86 machine without MCU simulator. This is possible through stubbing of pulp specific functions.
For now I have created test cases that cover:
In total 83 automatic tests that pass and that can be executed in 1 command. In the process of making the tests pass, I discovered several bugs, mainly related to bias computations, which I have fixed in this pull request too.
ceedling is also capable of generating code coverage reports. With the help of the unittests I was able to increase the line coverage of the modules to more than 95% each.
I added a README.md that explains how to run the tests and how to generate the code coverage report