aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/operators.cc
AgeCommit message (Collapse)Author
2023-11-29[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-29Fix 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-11-29Fix 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-11-29Add check of operator API to precommitEric Kunze
Attempt to avoid API getting out of sync. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ic7b72c3f906e4a38cb26159bb67e9b1c4e22ca96
2023-11-28Pass parameter acc_size to AvgPool2d operatorDmitrii Agibov
Signed-off-by: Dmitrii Agibov <dmitrii.agibov@arm.com> Change-Id: I4cd818af0db5e6e8a96641246cd3263ba4878f56
2023-11-28Upgrade 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-11-28Pass 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-09-12Support 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: I059484086887c3bd5e1af5b1aac0dacf0703f827
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-07-14Add support for int32 tensor datatype in model runnerJiacheng Liang
Signed-off-by: Jiacheng Liang <jiacheng.liang@arm.com> Change-Id: Ie31041cbcd01f6290be06eabfe5c619123ae989f
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-12Correctly identify "axis" attributes.Grant Watson
- Allows axis attributes to be treated differently to other arguments in attribute.def Signed-off-by: Grant Watson <grant.watson@arm.com> Change-Id: I1be2595c24bf22e5391a2911a5283391d310df37
2023-06-02Add support for boolean outputs in model runnerJiacheng Liang
Comparison operators produce boolean outputs, which need to be written into client data Allow subgraph traverser to use main block to look for tensors when serialization handler is missing Signed-off-by: Jiacheng Liang <jiacheng.liang@arm.com> Change-Id: I6f9af470185541fa6466b3f7786c48f1555fa6f6
2023-02-02Remove accumulator attributes from all but AVG_POOL2DJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: If67f503a1848967bc1671646c3011d055b622c52
2023-01-13Reference model update for control flow operators supportJerry Ge
Rationale for making this change: - In the original design, for control flow operators like WhileOp, child blocks couldn't read the tensor variables (global consts) in the root level block, this patch added the machanism for child blocks to access their parent level block's tensors. - This change also relies on another serialization change on adding another layer of abtraction called Region: - Serialization patch: [region] Add TosaSerializationRegion to serialization_lib - Updated the corresponding python version of the serialization code: TosaSerializerRegion to python version of serialization_lib - This change also relies on the TOSA MLIR Translator change: Add RegionBuilder to TOSA MLIR Translator - Added the WhileOp related test cases: While, LSTM, GRU, RNN - Other related fixes Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I13ae33628ad07e41d248e88652ce1328654694ab
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