aboutsummaryrefslogtreecommitdiff
path: root/reference_model/include
AgeCommit message (Collapse)Author
2023-12-12Add interface to model runner to run a basic blockEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ife703534594713616a992c460d201a8666c7b770
2023-12-07Add support for list of tensors as input parameterDmitrii Agibov
Some operators (e.g. Concat) expect list of tensor as an input parameter. Currently operators API does not support passing such parameters from the client code. In order to enable it: - Add new type tensor_list_t - Update operators API generation script to support new type - Add unit test for operator Concat Signed-off-by: Dmitrii Agibov <dmitrii.agibov@arm.com> Change-Id: Ib2f61bcea5e5ecabf56ce031d905cb46a4cc68ea
2023-11-28Fix Fast Fourier Transforms in operator APIDhruv Chauhan
* Change ignore list in generate_api.py to generate operators information. * Fix serialization attributes mapping for operator FFT and RFFT * Add a unit test for Fft2d and Rfft2d operator Change-Id: I3ad7a77a3c46aa586834188bab42cbdcc423e834 Signed-off-by: Dhruv Chauhan <dhruv.chauhan@arm.com>
2023-11-16Support loading shared libraries for custom operatorsJerry Ge
- Add a new command line option to allow users to specify a custom defined dll library - Add a custom registry to store all registered libraries - Add a dummy example (custom_op_example.cpp) for demonstrating this new feature Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I7c360835933f77e33fcbd772cabfe01d82282d47
2023-11-14[reference_model] Add local_bound supportTai Ly
Add support for local_bound attributes. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ie1acb65ca2495fb7d1512bf120568c695635d631
2023-11-01Fix TransposeConv2d in operator APIDmitrii Agibov
- Change name of the TransposeConv2d attribute output_shape to out_shape in generate_api.py to match with TOSA specification - Fix serialization attributes mapping for operator TransposeConv2d - Add a unit test for TransposeConv2d operator Signed-off-by: Dmitrii Agibov <dmitrii.agibov@arm.com> Change-Id: I6613c0d093aeea0af30012bcc1c8e5d26dec746c
2023-10-31Fix Reshape in operator APIGrant Watson
- The API incorrectly requires the new shape to be passed in twice. - This fix changes the name of the attribute from new_shape to shape in the generate_api.py script. - Adds a unit test to verify that the reshape operator works correctly. Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: I07dd0ef786c747896b6e54f4eada0e7b97c6cef3
2023-10-04Add initial TOSA MI generator supportJeremy Johnson
Add support for dot-product MatMul - test set 0 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Ifd15b42570014b634f59c94a1fd1cd56bac79ea4 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2023-09-25Pass parameter acc_size to AvgPool2d operatorDmitrii Agibov
Signed-off-by: Dmitrii Agibov <dmitrii.agibov@arm.com> Change-Id: I4cd818af0db5e6e8a96641246cd3263ba4878f56
2023-09-15Update reference model MAX_SCALE to match specEric Kunze
MAX_SCALE for the EIGHTK level is 256 now. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I6f3a3623d18ff238888d994c2a4129091f5a92fe
2023-09-15[reference_model] Support StatefulOps and the tests for CallOnceOpTai Ly
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I03cb878736ccd7e1f5e1f780d7171949a19a9de2
2023-09-14Change version to 0.90 draftEric Kunze
Include 0.90 draft serialization library Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I290360bfd1c147507e092868b5546c9be08682c2
2023-09-14Upgrade to latest version of TOSA specificationGrant Watson
- Updates TOSA specification to the latest version - Updates generate_api.py to generate the operator API correctly for ops with additional tensor inputs. - Removes default arguments for func_debug and func_config to make the API C compliant again. - Updates model_runner_tests.cpp for operators that have changed. - Adds a unit test for the Tile operator to check that generated code for additional tensor inputs works correctly. Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: I1e26065c6ed333b2ca4b3da39972d30f896fa6e5
2023-09-08Support new RESCALE attributesEric Kunze
input_unsigned and output_unsigned were added to the specification. Older TOSA files with uint data types are still supported. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I125886ffc92975d99971e56e2075dd5d96bdbdc4
2023-09-07Rework TOSA verification APIGeorgios Pinitas
Change verifier API to consume verification configuration in a JSON format and enable appropriate validation to be performed within the verifier code in the reference model. Also update to latest spec changes for main compliance but not yet including bias support. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I0ceaa1714dd041b00b5b29cd937c8f05e701bc4c
2023-09-05Pass func_config to individual operator APIGrant Watson
Updates the generate_api.py script and associated templates to allow func_config and debug_config to be passed when running individual operators on the API. This will allow us, for example, to set precise_mode and abs_mode when running individual operators. Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: Ia3e7ffc146f876daa307558433177c68285843b7
2023-08-18Add DIM operator to reference modelWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Iea11ee5d3d98773e9c5e9b827593c05afb41ce3b
2023-07-31Fixed missing tensor inputs in fully_connected in model runnerJiacheng Liang
Signed-off-by: Jiacheng Liang <jiacheng.liang@arm.com> Change-Id: I473adc1525319b5574ee0e36d10a530277d9215d
2023-07-25Run clang-format and update copyrightJerry Ge
- Also added run clang-format to pre-commit runs Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I4e59ac0afbaa30dce0773aa63d92a1a3b119e2f3
2023-06-29Fix missing template instantiationsEric Kunze
Would cause unresolved symbols to appear when building in release mode. There are a couple of minor compiler warning fixes as well. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I0f7e9a8771442a6e3c848edfe034ef534d0d8ca7
2023-06-29Add support for ERF operator to reference modelWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Ib42b867287b83a183a0d0fb1f1eb29974f58fae4
2023-06-26Upgrade to latest version of TOSA specificationGrant Watson
Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: I1296f968baca335ea88691bc973e2d01b2aa2c5b
2023-06-20Make verifiers to operate on const pointersGeorgios Pinitas
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I45287af6b33cf07383250dc962a97728e65697a7
2023-06-15Add TOSA MI verification methodsGeorgios Pinitas
Adds utility functions that enable compliance verification of TOSA MI operators; as per section 1.8.2 in the TOSA specification. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I0cced0ff8875ac8d78b1943211438713d1c51b88
2023-06-02Update version to 0.80 draftEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I175ef0acc6a6633c3e351b935a04db16de1bfbd5
2023-05-25Remove draft tag for 0.70 releasev0.70.0v0.70Eric Kunze
Update serialization library submodule Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1d6e2700ac55f429de742931627b07c9a4a46f14
2023-05-18Add abs calculations under precise_modeTai Ly
This adds a second run of reference model under precise_mode when test_desc.json contains a "compliance" dictionary which contains a "mode" entry with value "dot product". In this second run, abs_mode will be set to true, which causes: 1. evaluation will take absolute values of inputs for these operators: conv2d, conv3d, depthwise_conv2d, fully_connected, matmul, transpose_conv2d, fft2d, rfft2d reduce_sum, avg_pool2d 2. output files will have prefix "bounds_" prepended to them Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I7070ecc7ead2d2ea3375c44663d653c6772b88e0
2023-05-05[reference model] Add precise modeTai Ly
This adds --precise_mode=1 option to tosa_referece_model, which will cause reference model to convert all floating point tensors to FP64 tensors and compute all operators accordingly. Also adds optional -p arguments to test runners tosa_verif_run_tests.py and tosa_verif_framework_compiler_runner.py to run tests in precise mode Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I156055216ad61710096497a8fa1a653be2a602a3
2023-04-20Add level checking to TOSA Ref modelJerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I5689d7c6b902a319a68fa4628b59e0bcc23aeca4
2023-03-17Refactor 1L to INT64_C()Jerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: If3f8c5a1f2dffac36448101959557f86b6ab6c7f
2023-03-16Update version to 0.70.0 draftEric Kunze
Also include 0.70.0 draft serialization library Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ibdd3d52ecd39e710e0decb7afb6d5f5fad497e7d
2023-03-09Update version number to 0.60v0.60.0Eric Kunze
Also include the updated serialization library Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I8eb124533dbd00ef0c680fee4892d263c6a1f5ce
2022-12-15Extend reference model API with eager operator execution entrypointsGrant Watson
- Adds a script to generate operators.h and operators.cc - Adds jinja2 templates for generating operators.h and operators.cc - Adds unit tests for a subset of the operators generated - Includes the TOSA specification as a submodule - Adds supporting C++ and header files Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: I5b60db4c56113110d8e75fe1152525d258233f9c
2022-12-12Update version to 0.51.0 draftEric Kunze
Also include the updated serialization submodule Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I7a97ae05d16c8a98c38f954ee8014d0f32b282d5
2022-12-05Update version to 0.50 for releasev0.50.0v0.50Eric Kunze
Include the 0.50 serialization library submodule Change-Id: Ie25cacf20aadf66ef8c3097e41647a570a54edbb
2022-11-09Add BF16 support to reference modelJames Ward
* Upgrade Eigen to 3.4.0 (for bfloat16 support) and add work- arounds for reduce.any() and reduce.all() bugs (introduced between 3.3.7 and 3.4.0) * Truncation to bfloat16 now performed in eval() methods Signed-off-by: James Ward <james.ward@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If5f5c988d76d3d30790acf3b97081726b89205fe
2022-10-19Add FP16 support to IModelRunnerMatthew Sloyan
* Added specific FP16 readfromVector and writeToVector methods. * Added FP16 support to float readfromVector and writeToVector methods. * Added missing reference to IModelRunner::setInput. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I6b66468737e672afc925ccad4fb710fbb9427c14
2022-10-07Add IModelRunner interface to TOSA Reference ModelMatthew Sloyan
* Added IModelRunner interface using pimpl idiom, which allows a user to initialize, configure and run the model. * Added unit tests for IModelRunner. * Added doctest as third-party submodule. * Added user options to specify paths for dependencies. * Moved general func_config functions to separate utility, which removes cxxopts dependency. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: If42f1f82cd6dadf18911a48dcd5fa579b719aff2