Skip to content

Arm cmsis pack all ops test : change format of generated tests#2

Open
christophe0606 wants to merge 5 commits into
MatthiasHertelArm:arm-cmsis-pack-all-ops-testfrom
christophe0606:arm-cmsis-pack-all-ops-test
Open

Arm cmsis pack all ops test : change format of generated tests#2
christophe0606 wants to merge 5 commits into
MatthiasHertelArm:arm-cmsis-pack-all-ops-testfrom
christophe0606:arm-cmsis-pack-all-ops-test

Conversation

@christophe0606

Copy link
Copy Markdown

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:

  • The model
  • The inputs patterns
  • The reference patterns
  • The test thresholds
  • The input memory format

It looks like tensors are exported as channel first when going through the constant_methods export 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.json but 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:

  • An option to dump the metadata (everything in the pte that is not the model)
  • An option to dump the final graph before export in the pte.

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant