aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2024-04-18Add extensions & profiles support to conformance generatorWon Jeon
Support existing conformance profiles to ease transition New combined config tosa_ext_profile_ops_info.json that supports extension selection Signed-off-by: Won Jeon <won.jeon@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ic04696a01d619d191b9c8abc4ef7f4e8b86c52ca
2024-04-18Update compliance verify checksJeremy Johnson
Cope with large error bounds with small reference values. Change how error bounds of NaN are avoided for ABS_ERRORs. Update SIN/COS compliance to latest spec and use input value as magnitude. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I55aca59e0255e1cfd255b08edb845c3e33ca7eff
2024-04-16SPECIAL data gen mode for FP16 and FP32evacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I5a9a1c63345bd83ca04bc6c2a99b0ef3612971ee
2024-04-03Make Full Range FP16 tests into extra testsevacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I8c59ecb5a1fb53d0e9bf64333709f9e3cc908b49
2024-03-07FULL data gen mode for FP16evacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I81bb322132daf25328a40342edc62d8e1db9edd6
2024-03-05Add Tosa Sin/Cos operatorsJerry Ge
- Add Tosa Sin/Cos operators to reference_model - Add conformances tests Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I3f597ddf5dac2c64d6dd6aa15781b40b8468eaa6
2024-02-08Main Compliance: Add RESIZE supportJeremy Johnson
Add RELATIVE verify mode for RESIZE. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I4fe352579507211dae7a048bf080c24426ce42a2
2024-01-23Update RESHAPE and TILE conformance testingWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Iaf59472cb32e03a92bad87ae9dba1b7548f20268
2024-01-08Main Compliance: REDUCE_PRODUCT supportJeremy Johnson
Update and fix REDUCE_PRODUCT compliance verify lib support. Added compliance test generation with data range to not cause infs. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3b3004c6caa80d97e330a6393f435f5270b56e21
2024-01-08Main Conformance: Re-adjust TANH compliance checkJeremy Johnson
Add lower bound to ABS ERROR checks to allow for cancellation of small values in error bounds checking. Re-adjust the error bounds multiplier to match the specification. Fix up naming of verify library info structs. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3e178c3d7d59fef9c3696178646b23ed2a3ffc61
2024-01-05Remove operators APIDmitrii Agibov
The operators API generated by the script is no longer used and could be removed from the project. Signed-off-by: Dmitrii Agibov <dmitrii.agibov@arm.com> Change-Id: Ia611b069463b3aded7d6546987c2323674184673
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-30Adjust random data ranges for Main Compliance to avoid FP inf and nanJeremy Johnson
POW - there are now 3 test sets to cover random ranges. Also added ROUND mode to data generator to force integer exponent values. LOG, EXP, RSQRT, REDUCE_SUM & FULLY_CONNECTED - have had their ranges reduced for each test. Fix generate library configuration defaults and checks. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie5d3bd78f690cc787a2ca4eb9b4bd6808bd9238c
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-02Main compliance testing support for MULJeremy Johnson
Update verify ULP mode to allow fractions (e.g. 0.5). Update pseudo generator to accept ranges. Fix up pseudo random distribution based on ranges. Change-Id: I9168c5f7d37722678c0f1f9e906953c8cec367b1 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2023-11-02Compliance mode testing for CONV2DJeremy Johnson
Added CONV2D data generation. Updated verify dot product check to latest specification. Updated test generator and python datagenerator library to create const files during test generation. Add support for compliance test sets to conformance test_select. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I5be3b761a1e3ef259c058e493877cd5a89d5778b
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-12Conformance simple backward version and binary files supportJeremy Johnson
Add --test-version option to tosa_verif_conformance_generator to select the version for tests to output. Add --output-type to allow json, binary or both files to be created during conformance generation. Fix passing schema_path to test runner. Add explicit verify lib path arg to test runner. Change-Id: I5f1ad137d713fca408a98470ea77bddf8916c5f3 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2023-10-02Support for compliance checking testingJeremy Johnson
Updated to conformance generator to not generate tests with results for compliance tests. Updated test runner to run compliance mode version (precise & abs mode) of reference model to create test results to use against SUT results. Updated reference model to enable abs_mode on correct desc.json flags. Updated test checker to support compliance checking using verifier lib. Seperated color printing from test checker. Change-Id: I7e2fbfc6883916caa5d94d4ece122c48bf45f530 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2023-10-02Update verifier library data-type supportJeremy Johnson
Make compliance meta-data data-type required for all. Add data-type checking for all verifier modes. Add initial enum support for new ROUND compliance mode. Improve print out information from library. Use numpy ctypes.data_as to get f16 support compared to ctypes_lib. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie983ba4ea958a88556f30c09b3ebc19cd9ec96b7
2023-09-28Refactor path arguments to tosa-toolsJeremy Johnson
tosa_verif_conformance_generator - Move to using ref-model-path instead of ref-model-dir - Add schema-path and flatc-path - Add model_files module to locate default places for files convert2conformance - Remove default paths verifier - Switch to using exact path of verifier library tosa_verif_run_tests - Use conformance model_files to locate defaults Change-Id: Ieca3b164670e2a7dcb047743667cc4e8317daa97 Signed-off-by: Josef Malmström <josef.malmstrom@arm.com> 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-22Add 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-09-18Revert tag desc.json renamingJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3620799a01784865b3de1407e70e02582966f6d1
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-11Fixes for conformance generator tags and test selectionJeremy Johnson
Incorrectly used "tag" in test.desc instead of "tags" Incorrectly selected all tests rather than just all positive tests depending on operator selection option. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ib257bc57accf745beedfa4a3b2ece9539c0972c2
2023-09-07Initial lazy data-gen and compliance test build supportJeremy Johnson
Add initial support for compliance and lazy data-gen meta data added to desc.json for MATMUL. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I00c047814134a96d7c98d890e93b5884e25b8e64
2023-09-07Add desc.json schema validation with compliance/data_gen extensionsJeremy Johnson
Rename scripts utlities to tosa_* such as tosa_json2numpy Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie8d584e2afb189fb74cf96b39590c7c27444ba14
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-30Fix conformance regressions due to type and region changes.Jeremy Johnson
Compress flatbuffer JSON files for conformance to allow while_loop tests to fit in the 30MB file size limit. Do not include new SHAPE type in usable DTypes so that selection of ERROR_IF tests are not changed. Also enable strict json mode for flatbuffers. Change-Id: Id89a9963244c34769a4662f9951adde0aa3334d9 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
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-04-118K level: rank 6 tests support using generator groupsJeremy Johnson
Split generation of conformance tests into groups to avoid a change in existing tests selection * A standard group is used for the normal/default conformance tests * An 8k level group covers the extension of testing for 8k level * Other arbitrary groups can be created and the group names will be used to tag the tests, so that in the future they could be filtered Group selection criteria is in a new dictionary * A default selection config is used for generation groups * But a different config can be used for a particular generation group Added parameter sparsity for pad of rank6 and above, and further parameter sparsity options to test_select to limit number of tests selected. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ib9f1185c0ae6d0957df2116411c17e958157c6d3
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
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>
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-10-11Reference model changes for fp16 supportJames Ward
Change-Id: I72f21fcfa153046274969d327313e3349981dbe6 Signed-off-by: James Ward <james.ward@arm.com>
2022-07-14Add profile to all created conformance tests.Jeremy Johnson
Add supported profiles for each test in convert2conformance and tosa_verif_conformance_generator. Enable filtering of profile tests on running in tosa_verif_run_tests. Reorganize arguments in conformance_generator to have more important ones first. Change-Id: Ie6e5b68727adb3c39b04aa482dd6433788f7bcc9 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2022-07-12Add conformance generator scriptsJeremy Johnson
Change-Id: I5cb16ea1f47ee454f03a1d5182827e3fd9f49128 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2022-07-11Enable pytest pre-commitJeremy Johnson
Change-Id: Ia00a9fa0d260c68ce8532dec9925467558fe7dea Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
2022-01-17Add convert2conformance scriptJeremy Johnson
Script converts framework and reference model unit tests into a suitable format for including into a conformance suite. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ida1ec8a0a7ea31fd3a3f62c4cb52d7cc2bf0b439
2022-01-13Add python pre-commit script checkersJeremy Johnson
Fix up issues in existing python scripts. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Id4adab404560c3129c66f31c21ff0ce148283c73
2022-01-06Update tosa_verif_run_refJeremy Johnson
Rename to tosa_verif_run_tests to match build_tests Improve output and system under test support Improve xunit support Add results checker Add utilities json2numpy and json2fbbin Add set of python tests Update README.md Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ia09f8e6fd126579b3ba1c1cda95c1326802417ca
2022-01-06Reorganize verif and create packagesJeremy Johnson
Split generator and runner scripts Add package setup Add py-dev-env.sh/.bash to allow editing source files during dev Update README.md with installation info Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I172fe426d99e2e9aeeacedc8b8f3b6a79c8bd39d
2020-10-14Initial checkin of TOSA reference_model and testsEric Kunze
Change-Id: I2f8e7fa63e2ae40203e57d2cc8814bde3b312cb6 Signed-off-by: Eric Kunze <eric.kunze@arm.com>