aboutsummaryrefslogtreecommitdiff
path: root/reference_model
AgeCommit message (Collapse)Author
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
2023-03-03Update CAST fp to int roundingEric Kunze
Use rint() instead of round() to get round to nearest even behavior Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I45957be0e863de2207850b023626a7c0ea11e5eb
2023-02-28Update rank limits for SLICE, TILE and TRANSPOSELuke Hutton
Updated to align with corresponding changes to the spec. In addition, some ERROR_IF tests have been updated to match the checks specified by the spec, including: PAD, SLICE, TILE, TRANSPOSE. Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: Ie2c5f48e79a5610eb82739170e25057a63dac1d8
2023-02-10Add FFT2d to the reference modelLuke Hutton
Includes: * FFT2d reference implementation * Basic TOSA tests Change-Id: Ie79fcb713542345d550ec013646810c1e890e388 Signed-off-by: Luke Hutton <luke.hutton@arm.com>
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-31Create MI tests for Type Conversion: CASTJames Ward
* Add exclusion regex's to conformance generation Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I15bef7451efd5662065060242d35bd7fa3381487
2023-01-24Add RFFT2d to the reference modelLuke Hutton
Includes: * RFFT2d reference implementation * TFLite framework tests * Basic TOSA tests * Serialization submodule upgrade with support for FFT/RFFT Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: I2a687e9cf87fb62a26160ea52439ba9830bea36e
2023-01-19Fix for sign extending LOGICAL LEFT/RIGHT SHIFT resultsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I04261178694c004409aef2ff5c84c32b04729433
2023-01-19Create MI tests for Activation: CLAMP; Data Layout: PADJames Ward
* Existing float attributes now serialized as bytes Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I415276706b9daf0893e3a59189f387f872ff07c2
2023-01-18Update for RESCALE spec apply_add clarificationJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I6958904c2c8932e9fe03b3092672d62a06e96ee6
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-20Add explicit template instantiations for abstract classesJared Smolens
- Added missing explicit template instantiations for abstract operator base classes Change-Id: I5eb678837f0edaf9bad0f7358b05abc5e3246af4 Signed-off-by: Jared Smolens <jared.smolens@arm.com>
2022-12-15Add BF16 support to IModelRunnerJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I3339a78d9611905583272ffad0ef7668e046cfad
2022-12-15Create MI tests for Image: RESIZEJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I440590fa59433b9ddc1934188f2b34b377129c1f
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-09Fix reference model memory leaks for the following opsJerry Ge
- OpClamp - OpArithmeticRightShift - OpMul - OpTable - OpTranspose Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Icb84a8a17c298b471a635310454775977a9133cb
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-29Fix error messages/comments using old -C arguments.Jeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ib4c4fe433485282713d396b92d8acec812a17188
2022-11-29FP16 improvementsJames Ward
* Update FP16 resize to newest spec version * Correct casting to fp16 for graphs of >1 ops Change-Id: Iedff9a71eb7f72948b3c00a635bb0fd07d414bcd Signed-off-by: James Ward <james.ward@arm.com>
2022-11-19Fix the floating point precision issue for Sigmoid FP32Jerry Ge
The original calculation was auto-promoted to FP64 and causing the discrepencies between TFL and TOSA. Sigmoid is now calculated with only single precision floating point values. Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Ia65b491ccf8af2493cc01ca66c28faff841407c2
2022-11-18Zero point addition in RESCALE should be int32Eric Kunze
Clipping to the output range is done post zero point addition. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I5271a08fb2f6f9804fb1af3c6945131f948f452a
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-18Update to check tensor size is validEric Kunze
Validate tensor arguments Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Iac398f2c3e600944c6f65c3d8433bd17095f820b
2022-10-13Rename FLOAT type to FP32Jeremy Johnson
Update tensor operations naming to state input type as TxT in all cases. Effects CONV2D, CONV3D, DEPTHWISE_CONV2D, FULLY_CONNECTED, TRANSPOSE_CONV2D. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ic959acfcb3aa0a910b33b774a5a85fac08219205
2022-10-13Minor fixes & add FP16 support to refmodel testing and conformance genJeremy Johnson
Improve base inference conformance generation: * Change to target specific dtypes required for conformance tests. * Reduce dimension sizes of ERROR_IF tests. NOTE: Will impact tensor, clamp and all ERROR_IF tests. Add option to change seed on conformance generation for extra testing. Stop creation of convolution tests with negative output dimensions. Improve reporting on failing to allocate tensor due to above issue. Fix runner to correctly pass ref model debug flags. Update reference_model examples. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I992180dcfe265a7d50edfb151c9f38eeaef5c369
2022-10-12Remove conflicting REQUIRE definition in unit testsJames Ward
* undef reference_model def to allow doctest def Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I143a7d57344dd3c19248c30ced1aca1d770d47a3
2022-10-11Reference model changes for fp16 supportJames Ward
Change-Id: I72f21fcfa153046274969d327313e3349981dbe6 Signed-off-by: James Ward <james.ward@arm.com>
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
2022-09-14Fix debug masks in refmodel.Jeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3fbf3f531cd803b35892e8f07fc4a495f8c95f98
2022-09-12Update reference model version to 0.41 draftEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I862b4d0fa66328535d555d3d4624a5f3dd856cc0
2022-08-30Update revision to 0.40.v0.40.0v0.40Eric Kunze
In preparation for next release. Also include new version of the serialization library Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I577406339d527dd29f14196d6ff1bcd0ac3ffd78 Change-Id: Ia140cd16b21133c674f8ef1cf31e665982478c81
2022-08-29Update framework test generator to support TF/TFL conv3d.TatWai Chong
Add a new attribute `rank` to indicate the testing dimension range of input tensor. Also fix a minor bug in the existing conv3d simulation. And relax rescale operator in the reference model to support 5-D input. Change-Id: Ib42fe513831dc83eb7f9af07e011787a6c752704 Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
2022-08-26Align padding for transpose_conv2d to match specEric Kunze
Increasing out pad values now leads to increasing pad. Reference model changes, and test generator changes to match specification definition Change-Id: I4f3ebfbca5048354fb15bedc7ab640ff28ed853a Signed-off-by: Eric Kunze <eric.kunze@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2022-08-24Enabled 16-bit TABLE REQUIRE statementJerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ib6e81814e022f33e45430e47ca99d6d9f9e0e101
2022-08-22Simplify the argument parsing and debug codeEric Kunze
Change-Id: Ia681aa0eb1d42fa31a4658badb376f7b32b2e338 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-08-15Check that the shape calculation for PAD is correctEric Kunze
Matches a corresponding change to the specification Change-Id: If70356e0c78c1c88530e5d2f58bc50de864f249a Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-08-10Update TOSA resize to match specificationTatWai Chong
Attribute stride and shift are removed, and has new scale and border. Also add tests in the generator to test tf.resize with all option combinations. Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If0f330d04395762d2d907863235eda1532f5e1ff
2022-07-11Modify input limits for apply_scale_32Eric Kunze
Aligns with change in specification, as the limit to value being between (-1 << shift-2) and (1 << shift-2) was overly constraining. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I72cc5743344d4036920c3df366e0a3930701a0cb
2022-07-08Update reference model version to 0.31 draftEric Kunze
Include new submodule for serialization library. Change-Id: I38cdea3ed8ea3968d1dc06c689dab248d21b14fd Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-06-17Fix reference model use of weight zero pointv0.30.0v0.30Eric Kunze
In the case of an int16xint8 test, the zero point was not being subtracted from the weights. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ic77119b200b952715870abc11d09d1a646da86b1
2022-06-16Remove draft status from reference modelEric Kunze
Preparation for v0.30 release Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I65f6ee429a840d562c104c48335f8dcb51f79667
2022-06-15Remove quantization info from serialization attributesEric Kunze
Any needed information moves into the attributes for each operator. New serialization library version removes teh quantization information attributes from the schema Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Icf6165687ab1fd34a01f64c01b0b92b2820e72fa
2022-06-13Update transpose_conv2d to align with TOSA specTatWai Chong
Rename outpad to out_pad, and also fix the dilation in the generator. Change-Id: I4c1599871f0d0b41856e819d8c644a85ca6d8267 Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
2022-06-07Remove dilation from transpose_conv2d opEric Kunze
It is not in the spec and is being removed from serialization Change-Id: I82a102de37d8eb75210088dfda2df9b2fadb9c74 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-06-07Change size check in TILE to ERROR_IFEric Kunze
Now corresponds with the ERROR_IF in the specification Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1f4e303c330d18661ca2e6ef65d0119baabedec6
2022-06-07Align the serialization schema with TOSA 0.24.0 specificationTatWai Chong
The operators are pool, conv, reshape, slice, transpose, and table. Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: I13f8d626df59be14361068222746347ba69d2fb5
2022-05-31Remove RESHAPE -1 dimensions supportJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I098daf49c92da12c07143cdd23ac9bb58acebbb9
2022-05-26Add support for uint16_t to RESCALEJeremy Johnson
Update ref-model RESCALE op to support UINT16 conversions Add testing for RESCALE UINT16 and ERROR_IFs Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ic6e6e53de1f0b054bedb9e6ba3856e7475498aba