aboutsummaryrefslogtreecommitdiff
path: root/verif
AgeCommit message (Collapse)Author
2023-02-22Add tests for INT48 CONST supportLuke Hutton
* Add TOSA test coverage * Add some basic error checking Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: Ib02df7319954a2dcb915e5f5a70699ca398fd483
2023-02-14Select new TFLite SPLIT testsJeremy Johnson
Due to change in generator creating different test patterns. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I58224dc117c766b22fccd418f64004aea31905b5
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-07Adjust ERROR_IF tests generated for tosa-mi profileJeremy Johnson
So they do not overwrite tosa-bi tests, ops affected: NEGATE, TILE, REDUCE_MIN, REDUCE_MAX, RESIZE, SCATTER, GATHER Update test-select exclude-patterns to work with ERRORIF tests. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Idb0d26512ce9a48f6d868663a630e343c8785899
2023-02-06Create MI tests for Tensors: AVG_POOL2D, FULLY_CONNECTED, MATMULJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I874c87745b929f9808a5e45490042420a57b22f7
2023-02-06Create MI tests for Tensor: CONV2DJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Iefd8490d9eedc76d199d36943b87c99e4dd97612
2023-02-02Remove accumulator attributes from all but AVG_POOL2DJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: If67f503a1848967bc1671646c3011d055b622c52
2023-02-02Create MI tests for Reduction: REDUCE_SUM, REDUCE_PRODUCTJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I21b8f8139ce069d5fc6bbeabe292e3a44d99fe10
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-30Add framework tests for tfl.atan2Luke Hutton
Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: I11a891296a040f4e48187d0d51a4dd2c554805ac
2023-01-27Add RFFT2d to optimized only kernel listLuke Hutton
This fixes framework test generation when the "optimized" kernel mode option is not selected. As a result, the optimized RFFT2d kernel is used when generating tests in the reference kernel mode to prevent "op not found" errors. Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: Ice18bfa08c46e237e39c99f849622bf99d9b849c
2023-01-27Add framework test for math.signTatWai Chong
The result comparison between Tensorflow runtime and the reference model hasn't been checked as the sign operator is not supported by the native TFLite runtime. That said, since the generated tosa ops for tf.sign and tfl.sign is identical, the correctness presumably can be proved by the result from tf.sign. Change-Id: I72eb415df7fb6ca4dc9103f9ddc7104b0ba39234 Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
2023-01-25Create MI tests for Comparison: EQUAL, GREATER, GREATER_EQUALJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I4d4834260698db75427590c0a8b80cc3c824ef3b
2023-01-25Create MI tests for EW Unary: LOG, RECIPROCAL, RSQRT, EXPJeremy Johnson
Also fix the ERROR_IF conformance test generator to apply correct operator filtering to create the tests. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I5788932e3529ec9386900623b20c22c98e4201b7
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-23Create MI tests for Data Layout: SLICEJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: Ief60ae8fa490ded21aa77726d738565be5f8d91c
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-18Add framework tests for tf.sin and tf.cosLuke Hutton
Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: I342a162e252c8527d5b318ceaf5f1de70fa5dc34
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
2023-01-04Create MI tests for EW Binary: ADD, SUB, MULJeremy Johnson
Add option to control negative tests dim range to stop ERROR_IF test clashes between profiles. Change-Id: I1f806934480cc32b95e80613c66fecb1e6ff5426 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2023-01-04Create MI tests for EW Binary: POWJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I8d478b7bd13559ea37e27f77b05ee5db56c8f9e3
2022-12-15Add extra control flow ERROR_IF testsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I7276dc686d8d18ba44663b73e35ceca2a1cbaadf
2022-12-15Create MI tests for Image: RESIZEJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I440590fa59433b9ddc1934188f2b34b377129c1f
2022-12-15Create MI tests for Activation: SIGMOID, TANHJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I75d6280ecb5219d50c91d14029e90ff3a2f6eb06
2022-12-14Create MI tests for EW Ternary: SELECTJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I1eb4fbadb9117e28f87a36ee828d65d896d834f0
2022-12-13Create MI tests for EW Unary: ABS, CEIL, FLOOR, NEGATEJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I2ee6d4f706958b6261fd41dd245a3d01d3f8cecf
2022-12-13Create MI tests for Reduction: REDUCE_MIN, REDUCE_MAXJames Ward
* Also include test_select improvements Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I306a8ed57975bc429d6cd5a8a24777b889593ddf
2022-12-09Create MI tests for EW Binary: MINIMUM, MAXIMUMJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I6824e30cece291fceaedd727132a6b211762baa9
2022-12-09Add framework tests for tfl.sin and tfl.cosLuke Hutton
Although the legalization is currently supported in the TFLite runtime, the tests were missing from the reference model. Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: Iae3cd54f145f69a84943867b418063a4d4109d87
2022-12-01Fix conformance desc.json contains correct profilesJeremy Johnson
Must seperate conformance generation by profile to stop desc.json being incorrectly overwritten by different profile information. Change-Id: Iead01c9fcc659e48ef1d350a860b03c2b0a05ffa Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2022-11-21Create MI tests for Data Nodes: CONST, IDENTITYJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I7280b3bf31aa377a6f6af7713627f34eb445e689
2022-11-21Create MI tests for Data Layout: CONCAT, PAD, RESHAPE, REVERSE, SLICE, TILE, ↵James Ward
TRANSPOSE Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I626d9ece0290c5104c9ac42d20be2f9db1e55fa7
2022-11-21Create MI tests for Scatter/Gather: SCATTER, GATHERJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I44c0843fa049546582ca1111795342d5035a329c
2022-11-21Create MI tests for Tensors: ARGMAX, MAX_POOL2DJames Ward
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I908d88ddf7c52d98ce6d533396b5c439f15750f5
2022-11-19Initial set up of Main Inference conformance test genJeremy Johnson
tosa-verif-build-tests - option for setting FP values range - option for recursively finding tests - change from os.path to Path tosa_verif_result_check - option to supply FP tolerance - output difference and max tolerance on contents mismatch - change from os.path to Path MI conformance - contains examples of AVG_POOL2D and CONV2D tests Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I8e1645cd8f10308604400ea53eef723ca163eed7
2022-11-11Add framework test for tfl.preluTatWai Chong
Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: Ib894e50f4b869a3f4936885704995a417ea25eef
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-26Add TILE bool tests & rename CAST/RESCALE testsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If9639a94c8e7322d470a1ca97e9e95d821683629
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-11Reference model changes for fp16 supportJames Ward
Change-Id: I72f21fcfa153046274969d327313e3349981dbe6 Signed-off-by: James Ward <james.ward@arm.com>
2022-09-26Add CONST testing to Numpy refmodel testsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Id32f3b7c287c9e8b0fd42dd96922be5a255598e2
2022-09-22Add framework test for TF and TFL mirrorpadTatWai Chong
Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: Icc9b8f6a65ee54ddbb445c3a999ca49401b660c2
2022-09-21Add simple post commit reference model testing against NumpyJeremy Johnson
Only perform testing of this after build of ref model using postcommit pytest mark. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I771a18d2c9cd4051fecafad3e6079b44f2ed62fa
2022-08-30Update RESCALE testing to match no rank restrictionsEric Kunze
Matches changes to the specification loosening the rank requirements for the RESCALE operation. Includes removing wrong rank testing for RESCALE, and increasing conformance testing to rank 5 Signed-off-by: Eric Kunze <eric.kunze@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I4e15d4bd8f448e1ec81d9a8bbcd231c286b64a30
2022-08-29[Fix] Wrong dimension is inferred in tensor shape generationTatWai Chong
Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: I0bccfbe971f64986d71cef5a1d68daa7eb1697c4
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-25Add generator functions to support TFL geluTatWai Chong
Change-Id: I1056f4a3abe9079381fb2c7d02edf11312aba9d6 Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
2022-08-25Add PAD ERROR_IF test for output shapeJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I25a13540734fa30c0c21b46708dfabbec8c4d1e5