Arm cmsis pack all ops test : change format of generated tests#2
Open
christophe0606 wants to merge 5 commits into
Open
Conversation
Restricted to a small set of operators to test. Will be extended to all operators in the future. pte now contains atol, rtol, input and output test patterns.
Only focusing on quantized_pool_xxx and quantized_conv2d for this commit.
For the tests to be reproducible, we need to remove the random weight initializations in some operators. This is done by setting the weights (and bias) to a constant value (1.0) in the operator recipes.
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.
Summary
The format of generated tests is changed by this PR. The corresponding cmsis-all-ops-test project will need to merge the new PR too to be able to work with this new version.
Tests are now self contained in the pte. Each pte file contains:
It looks like tensors are exported as channel first when going through the
constant_methodsexport path but some tests need channel last memory format. So a memory format boolean is used by the C++ test to correct the memory format of input tensor and expected output for some tests.The output model folder now only contain the .pte files. There are no more any subdirectory.
Strings are still generated in the
manifest.jsonbut all other data is in the pte file.Some test recipes have been changed to ensure the Cortex-M pass is generating a correct graph.
Two options have been added to
generate_test_models.py:It looks like no tool (Netron or ModelExplorer) is able to display all the pte without errors. So the only way to look at the final graph to check there are no errors is to dump it.