aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-07Fix shape generation with num-const-inputs-concat optionJeremy Johnson
Change-Id: I2a0aa63a4256629d12166638812dc5b854db2ddf Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2021-10-06Fix reduction ERROR_IF casesKevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Id0e4ec849a9cf94c9fb04ca999738cc164dbb669
2021-10-05Couple of reference model fixesKevin Cheng
- comparison ops could have different type of input/output - add SUBGRAPH_ERROR_IF() when operator doesn't have any output tensor Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I10f2c10f92de1c7a979221a421fa8e86b26fcc72
2021-10-04Add shared ERROR_IF statementsMatthew Haddon
* Added WrongInputType and WrongOutputType checks * Delete and Add extra inputs/outputs when doing op graph checks * Add incorrect rank checks * Entire op dictionary is now passed to build functions * Error if validation now done in separate function * Duplicate tests are ignored Change-Id: Ie1117bdbc9bdeb42059123792ce1df4cc56db54e Signed-off-by: Matthew Haddon <matthew.haddon@arm.com>
2021-10-01Fix CONST test.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Iea91076f3e0673ce5adfcca247d968416023fa58
2021-09-30Fixes to pass NEGATE op test.Kevin Cheng
- Elementwise unary op input/output type should match. - TOSA_UNPREDICTABLE should ONLY be sent when a tensor with negative dimension is read/written Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I689518933a2b56cd62793e3f28ea66a6e57b057c
2021-09-30Add SUBGRAPH_ERROR_IF() to catch graph-level error.Kevin Cheng
- Also replace SIMPLE_FATAL_ERROR() with FATAL_ERROR() since they're duplicate - Replace FATAL_ERROR()/ASSERT_MSG() with ERROR_IF_SUBGRAPH() if the condition is a graph error FATAL_ERROR()/ASSERT() should only be used by model internal/runtime error like file reading. Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: If1e1e2488054a0ecd800fb0f2ea6487019282500
2021-09-30Remove duplicate output tensor in cond_if_binary testKevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ic0c4bd1a55c6782aeacb77163a3a093edb86d437
2021-09-28Remove ReluN op.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Iaac727159a84de1f83de549c3a22704096f46bf9
2021-09-28Removing rank 0 broadcast in binary op.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I14bec5020c91f7abd6c1adc31068a22961330a97
2021-09-27Op that violates rank requirement now runs to the end and return ERROR ↵Kevin Cheng
instead of bailing out. Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I61e163cfdb54057f65dc967394decc3fad53eb89
2021-09-27Add ERROR_IF support for RESIZEMatthew Haddon
* TosaErrorValidator implemented to produce and test for ERROR_IF conditions * RESIZE specific ERROR_IF test support added * Set rank and type parameters before test generation loop to avoid multiple checks for valid parameters * Increase output dimensions if IFM/OFM ratio smaller than 1/16 Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I430e13383d99c2e25354f53d3703fb9be973f6d4
2021-09-24Extended tests for 2D/3D tensor functionsLes Bell
* larger values for stride/padding/dilation/kernel * sparse test generation, as there are too many variations Signed-off-by: Les Bell <les.bell@arm.com> Change-Id: If13ea17024d81262ab892e3111cbf5833e77a8c5
2021-09-23Add stride larger than dimension error_if check for resizeMatthew Haddon
Change-Id: Ib70f6bdbfacfe125283821f1e3858542b05c60ad Signed-off-by: Matthew Haddon <matthew.haddon@arm.com>
2021-09-22Unit test runner ergonomicsJared Smolens
- Catch and classify as INTERNAL_ERROR unix signals thrown by reference model - Made -t a required argument Change-Id: I2be1ed6f5c1e862d6a3aee43c6b1e8575ab50d1f Signed-off-by: Jared Smolens <jared.smolens@arm.com>
2021-09-20Add maximum dimension check ERROR_IF in RESIZE.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Iccbabe4298de4bd681115e273c16c48ea6d3028e
2021-09-20Compatibility with flatbuffers 1.12.0 and 2.0.0Jared Smolens
- Update the serialization code to work with both flatbuffers 1.12.0 and 2.0.0 APIs Change-Id: If41da785a2ab756de94b523d04358489ef01d603 Signed-off-by: Jared Smolens <jared.smolens@arm.com>
2021-09-16Generate more CONV3D testsLes Bell
* plus extra debug info for some exceptions Change-Id: I667ee9b8a1cba8c6bd47c31231f1805eba680ba5 Signed-off-by: Les Bell <les.bell@arm.com>
2021-09-16Implement Conv3D kernel.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ic16e918b1a2423ad563684e29ce70d9efdbf9c02
2021-09-15Rename attribute: Pool2d, Conv2d, TransposeConv2d -> Pool, Conv, TransposeConvKevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I466dd1dcf5230e8e07df202ba88515e775e04a1e
2021-09-15Add a top level license fileEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I98a6b05622dd88e5e3fe1b7ec79d67ae803e6c2d
2021-09-15Fix for ADD/SUB saturation in testsJeremy Johnson
Change-Id: I4f05b256f4f439f72e5ee8bce60e4e92b6aaa6e7 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2021-09-14Fix while_loop test.Kevin Cheng
- add output tensor to main block - fix bug where tensor cannot serialize list of const data Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I40b96d634642e24e6fae6fa3ad6846f5911005f7
2021-09-14Add saturation REQUIREs for ADD,SUB,MUL,INTDIVJeremy Johnson
Change-Id: I358fbd4c958e057687f25d585eb8fdd80fd9ae42 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2021-09-08Remove invalid tests from test generatorMatthew Haddon
* Implemented InvalidValidator to remove existing invalid tests. * Removed invalid tests for resize, rescale, conv2d, depthwise_conv2d, transpose_conv2d, avg_pool2d, and max_pool2d (note default avg/max_pool never produced negative tests, but theoretically could). * Changed behaviour of computerMultiplierAndShift to produce the allowed range of shift values. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I5e7b11030deb5322e2ca08fd4f4467fb02b7740d
2021-09-08Allow user to specify test type generatedMatthew Haddon
* The option --test-type allows the user to select 'positive', 'negative', or 'both' types of tests produced by the test generator. * Reset RNG when looping through negative test generation (generation not implemented) Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I1bfcb3170e7380be0f98b36b3d4abc4779a05abe
2021-09-07Fix batch size if target shape set for SCATTER operatorMatthew Haddon
* max batch size ignored if target shape is set * W size reduced if large input tensor used Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I13472ab768fa93a1d0b9e28964f56ec4a06dbdfd
2021-08-31Rename DIV operator to INTDIVMatthew Haddon
* In line with the TOSA spec the DIV operator has been renamed INTDIV Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I1dc6e88220ef26b24487675600b6cd1e5bb8b0f7
2021-08-31Set TILE multiple to one if input dimension is largeMatthew Haddon
* Sets multiple of input dimension to one if the dimension of the input tensor is large to reduce ouput tensor size. Change-Id: I2ebcecf438282de032a33e0cf4b3847cbf94440d
2021-08-25Restore expectedFailure to test description filesJared Smolens
- Updated example tests, added missing npy files - Updated README file with fields in desc.json Change-Id: I5651ed5260866a8381adf620fb6dd6405cb2833b
2021-08-20Replace node level check ASSERT_MSG_NODE()/FATAL_ERROR_NODE() with REQUIRE() ↵Kevin Cheng
or ERROR_IF() - Adding return code enum class: {VALID, UNPREDICTABLE, ERROR} - Runtime errors (e.g. memory allocation failure) will abort immediately, or will return one of the three return codes Part of the codes are re-written to pass REQUIRE() to the top-level (e.g. apply_scale_32/16()) - Update setExpectedFailure() to setExpectedReturnCode() on test generation script - Update test regression script to interface with reference model change Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ia063c936bcb2a54d6e379a5bb6801aa72d1186f1
2021-08-20Make MATMUL output shape randomMatthew Haddon
* Currently when a target shape is specified, the W value of the input tensor is always equal to N, this is not the case when no target shape is defined. * A random value for W is generated every time. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I8f8ecb32308cef4a1ece1871f76ebbd5f0cf881f
2021-08-19Produce Concat tests with multiple input tensorsMatthew Haddon
* Concat tests now contain between 2 and 5 input tensors concatenated together * Both input and const tensors are used as inputs to the operator * Option to add in const tensor inputs (this is slow), defaults to original behaviour Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I2a0cc622d31aceab8d24521668d0aae040ba73b1
2021-08-12Support int4 weights read. Added conv2d int8xint4 in test generation.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I61620f160c7dad6aac5fcc3da0a6e97f3bae5b40
2021-08-12test gen PAD agPad fix to cover all pad valuesLes Bell
* encode pad in the test name with leading zeros Change-Id: I7b1cc04014d390e707de099c5f78f93f5f344d69 Signed-off-by: Les Bell <les.bell@arm.com>
2021-08-12Add support for UINT8Matthew Haddon
* RESCALE can now produce tests with UINT8 as the input/output datatype. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I0a5d7b3c6dd7c2501d14e5d558b1f18e5e967fa9
2021-08-12fully_connected test OC independent of input shapeLes Bell
Change-Id: Ib299b78abe0e5c2ef0aeff9d853e583078768e1c Signed-off-by: Les Bell <les.bell@arm.com>
2021-08-10fix output type for resize in test genLes Bell
Signed-off-by: Les Bell <les.bell@arm.com> Change-Id: I9daf8fd691af74500819718519caac30c966a1f2
2021-07-29fix quantization zero-point generationLes Bell
* for int8 and uint8 only * not for int16 * pass all data types to the quantizaion generator functions as some operators (all convolutions, fully_connected) may use different types for the input and weight tensors * also allows input type filtering for convolution operators Change-Id: Iea3d00f03807a8db35b40d4e8988929ec6549b44 Signed-off-by: Les Bell <les.bell@arm.com>
2021-07-29Fix random INT4 and INT8 dtype ranges and clamp attrsJeremy Johnson
Change range of INT4 to -8 to 7 and INT8 to -128 to 127. Change clamp attributes to be in range of signed input type. Change-Id: Iccee1bf29b12da6f7622922f89d59cc0730460c2 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2021-07-27Fix bug causing test generator to create unused input tensorMatthew Haddon
* The SELECT operator requires a boolean condition tensor, this is now enforced earlier in the code to avoid an unused input tensor being created. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: Ief78cff8bd42bd24e9b977d41d05c1504d0422b4
2021-07-20Add INT8 table operator support to test generator.Jeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I5f01fa589692f7c6d556a4c22a44caec7c906b9d
2021-07-15Update serialization_lib hash.Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I122ef93965d04b715ed6eccddd8f4854d71b30f1
2021-07-13Make operator tests follow consistent naming schemeMatthew Haddon
* By making the naming scheme consistent for MUL tests (shape_type_perm_shift) we are more easily able to parse parameters. This is the same system used for operators like RESHAPE, where perm0 is the only permutation allowed, but it still included in the test name. * For multiple operators axis and axis value were split by an underscore, Now the form is axisX in line with other parameters. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I92e5af6fd1e2b83bdb23ac4a4ab350010aeeeccb
2021-07-13Allow selection of higher rank tests using --target-rankJeremy Johnson
* The default rank range has been increased from 1-4 to 1-6. * Higher ranks often make tests too large so a default_test_rank_range has been included which makes the test generator produce only tests with ranks 1-4. * The user can now specify target-rank up to rank 6 which is allowed for all operators with the default rank range. * The maximum rank allowed (6) stored in TOSA_TENSOR_MAX_RANK variable. * User specified target shapes up to maximum rank are accepted without need for setting target-rank filter. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie4ca408d329cb1000ce9d3592b2c7d62bf311b3b
2021-07-09Fix bug causing reshape rank not to match test description.Matthew Haddon
* Tests produced now correctly display the rank being reshaped to in the file name. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: Ic31fce68b6b8bf7aa52686d54752d90d4b7e2242
2021-07-07Fix bug causing identical reshape permutationsMatthew Haddon
* When generating permutations of a reshape operator test there was no check to ensure that the permutation was unique, this patch adds a check to ensure that no two newShape variables are the same. * Added a 'escape_counter' which will break out of while loop if it continues on for too long. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: I231eb9b546a73431835b5dc899784f69cc22a773
2021-07-01Adding option -Coutput_dir= to control output location.Kevin Cheng
- If not specified, will be initialized with dirname(test_desc) - Like -Cflatbuffer_dir, reference model isn't responsible for creating directory. User need to make sure target directory path exists. Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I9cfcc801cff648e53306f8de8ea8d5eaaf87ea80
2021-06-28Fix transpose test gen of permutations & rankJeremy Johnson
Change transpose permutation generation to limit to the number of possible permutations that can be created by the shape size or the argument setting which ever is smaller. Also make sure all permutations up to this number are generated rather than randomly skipped due to duplicates. Allow rank 1 transpose tests as the specification allows rank 1. Change-Id: I28ea64c1d819f3af72c97bed43cfe7279c7e2f9c Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2021-06-24Update to use new serialization_lib API.Kevin Cheng
- Constant tensors are now initialized from embedded u8 array instead from numpy. - Python unit test generator and built-in test hasn't been updated. Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I5cb86f8e5ec8f23fee5dcbf257874a0f204ede04