aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/tosa_arg_gen.py
AgeCommit message (Collapse)Author
2024-04-18Non-finite data tag for FP_SPECIAL data gen testsevacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I21e305dbe4f406e85c6ed3d5b30b5b85dd208825
2024-04-17Correct types of int16 and int8 input tensors for testsJeremy Johnson
Fixes input tensors for int16 and int8 tests for MUL, LOGICAL_LEFT/RIGHT_SHIFT, COND_IF, WHILE_LOOP Change tensor generator functions to use type aware randTensor() function. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If81a783929c29e1fd5e91477dbcdaf79c738f6b0
2024-04-16Fix ARITHMETIC_RIGHT_SHIFT shift tensor type for int 8 & 16Jeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I91f7bc956c3b141e1518098781bbf29577c3fbbc
2024-04-16SPECIAL data gen mode for FP16 and FP32evacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I5a9a1c63345bd83ca04bc6c2a99b0ef3612971ee
2024-04-11Add rank 0 testing supportJeremy Johnson
Default test range is now rank 0 to 3 instead of 1 to 4 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ibde66b60b58de9f4a3852a3807c01f8dae61206f
2024-04-09Fix/improve SLICE test generationJeremy Johnson
Only generate valid arguments for slice, improving test generation. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Id2db7bd42773e8d182ad814c4295ea4927a035a8
2024-04-09Generate tests with random combination of const/inputsJeremy Johnson
Override the default input/consts used for each op with biased random combos. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I7a5eb2b01a47248bc0db5a2f930ad2ac52cc0a67
2024-04-03Make Full Range FP16 tests into extra testsevacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I8c59ecb5a1fb53d0e9bf64333709f9e3cc908b49
2024-03-28Improve PAD coverage for main conformanceJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ia3e0d871525840f26948b45658bba71e75d767ea
2024-03-28Improve CONV2D coverage for conformanceJeremy Johnson
Enable testing of broadcastable bias channel. Change convolution arguments function to calculate workable convolutions by adjusting PAD size as needed for FP and errors. Add --conv-kernel build_tests option to allow different sized convolution kernels Improve coverage with batch size, specific shapes and kernels of 7x7 and 9x9 Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I59bb737f398f4363cc606b24fea7812b2059bc01
2024-03-25Fix missing Pooling ERRORIFsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I749b1b9fbfa32954d8748a860280c86087c08e7f
2024-03-21Fix data range of int ADD/SUB opsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Iaeed119ff81c8d1363dd26be7468bb53f9d70eae
2024-03-20Fix missing/broken ERROR_IF testsJeremy Johnson
Fix CONV2D WrongOutputType FP32 & Pad/Stride/DilationSmallerZero issues. Fix PAD WrongInputType. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I57fc57c43e63685e05bf5e3d562c3167411fd57b
2024-03-20[ref model] Add acc_type to Conv OpsTai Ly
This patch implements changes required by the new acc_type field in ConvAttribute and TransposeConvAttribute Signed-off-by: Tai Ly <tai.ly@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ib13dbeec4d8920e0ddbcca02b727e7277f2c8d62
2024-03-19Updated build_tests to support different random generatorsJeremy Johnson
All generator functions now take RNG argument to allow different random number generators, rather than relying on global RNG Default behaviour is the same as before using global RNG Added stable random generation mode * shape rng based on operator, rank and datatype * arguments rng based on operator, shape and datatype * build operands and data rng based on op, shape, datatype and args Add optional stable RNG test generation to conformance_generator Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I5ee4ff85575a81177fd74ed1617e946bfa3a0769
2024-03-17[ref model] Change Clamp and Pad attribute fieldsTai Ly
This implements changes due to ClampAttribute and PadAttribute field changes. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ide01e2a27fe3c1ea7794e7a4b6780b7eae436caf
2024-03-13Fix REDUCE_SUM compliance test creationJeremy Johnson
Make sure output shape is big enough to perform statistical compliance error checking. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ia7ed7dd19a6c9cb888363f6cbdf0c6943235e0be
2024-03-12Improved test selection before test generationJeremy Johnson
Add test list output to tosa_verif_build_tests and test list capture to file for tosa_verif_conformance_generator Improve PAD & CONV2D test coverage for tosa-mi conformance Change to use logging for output to hide info from test lists Tweak verbosity levels of tosa_verif_conformance_generator Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ic29da5776b02e9ac610db6ee89d0ebfb4994e055
2024-03-07FULL data gen mode for FP16evacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I81bb322132daf25328a40342edc62d8e1db9edd6
2024-03-06[ref model] Change RescaleOp attrs to inputsTai Ly
This patch implements changes required for RescaleOp's multiplier and shift changing from attributes to inputs Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I178919727e3220c749dad0ebce141e695868fee0
2024-03-01Testing support for MUL with shift as inputJeremy Johnson
Always create the shift as a tensor for all types in testing. In the reference model, set the shift operand to be available for all types, but only read in the shift tensor for i32. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: Ia267cbf8b63ca0a9c97b38e8fb4db83eeb8c0538
2024-02-26[ref_model] Change resize attrs to inputsTai Ly
This patch implements changes needed for resize op's scale/offset/border changing from attributes to inputs Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I20db0687fad40711f3ded644af51096292dd05b3
2024-02-21Add support for FP8 to reference modelWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: I99b70f94aff2ccd4af64875697e124eb60bc5b08
2024-02-12Update test builder internal interfacesJeremy Johnson
Move remaining ops from using testArgs to argsDict. All tvg/build_fcn function interfaces updated. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie886fd931bd74608bda621363100bf8bfd7385e6
2024-02-08Improve Avg_Pool2D ErrorIf TestingJeremy Johnson
* Add test for invalid accumulator dtype Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I506e2047623372670b82db6e9c0010fa89802851
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-02-08Main Compliance: RFFT2D supportJeremy Johnson
Correct ref model to produce imaginery values of zero as specification indicates at certain output positions. Fix up precise and abs modes for RFFT2D in ref model to produce correct results and bounds using abs weights. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I33767e4219a260278f7933f28b1799223a95a3cc
2024-02-07Main Compliance: FFT2D supportJeremy Johnson
Improve access to DOT_PRODUCT generator index and location for debugging. Enable multiple result files for compliance and improve output. Fix up precise and abs modes for FFT2D in ref model to produce correct results and bounds using abs weights. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ide0c9f9f80397e5f1e07ca30a1036d6014b5784d
2024-02-06Main Compliance testing for TRANSPOSE, REVERSE, and CONSTevacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: I95b931c032ce16c56ee05caab4dd26ea89557b3c
2024-02-01[testing] Switch to using shape type for start and size of sliceTatWai Chong
The type of both start and size of slice are tosa shape type since 0.90. Update the type of these arguments and its usage in testing. Change-Id: Iff582982ad55d64a792183c6d46c9266510f924c Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
2024-01-30[ref model] Change PadOp's padding to ShapeTai Ly
Changed to use pad input of PadOp for testing. The pad input is now a tensor of tosa.shape type. moved padding error checking from checkTensorAttributes to eval modified pad's PadOutputShapeMismatch test generation to avoid generating output shapes with dimensions <= 0 Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I437c86d9a012903458a648667f6693db67b97d76
2024-01-30Fix up shape operator test errorsJeremy Johnson
Update serialization_lib to store SHAPE as INT64. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie589cd6670dc79b77df981c81cd7c27b982f20fa
2024-01-30Main Compliance: TRANSPOSE_CONV2D supportJeremy Johnson
Update data generator for main compliance values. Add test generation support. Fixed test set by including large 65k tests that were missing. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I8668c774e01c17e5d999aadf99c317e2dd893857
2024-01-30Main Compliance: DEPTHWISE_CONV2D supportJeremy Johnson
Added DEPTHWISE_CONV2D data generation. Updated test generation for FP16 and FP32. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I0471d0a1e4e279a27233f4d285082906ceea1bff
2024-01-29Main Compliance testing for SLICEevacha01
Signed-off-by: evacha01 <evan.chandler@arm.com> Change-Id: Ib9d0abe0bd8826ca5ac051a5fe6ba18e1ba727f1
2024-01-24Add conformance testing for shape operatorsWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Ie80570146601c470a3be7c04a9d6e1016a7c547c
2024-01-23Update RESHAPE and TILE conformance testingWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Iaf59472cb32e03a92bad87ae9dba1b7548f20268
2024-01-18Main Compliance testing for TILEJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I7f7449c652844097fec6226bcc32ca765b40bc04
2024-01-17Main Compliance testing for CONCATJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If08c560eac171124641dac66d7de9d5053db72df
2024-01-17Main Compliance testing for SELECTJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I7276f2db39e67314c950e972cc1a97b7796dcd18
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
2023-12-14Remove inferred dimension from RESHAPEJeremy Johnson
Test generation changed to only produce static reshape tests Reference model changed to produce ERROR_IF on inferred shapes Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I92c92a40e7c0e457961bc654630040dff79a750b
2023-12-14Main Compliance testing for SCATTER and GATHERJeremy Johnson
Added indices shuffling and random INT32 support to generate lib with testing of these new random generator modes Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I058d8b092470228075e8fe69c2ededa639163003
2023-12-11Enforce no output rewrite REQUIRE in SCATTERJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3555e7216d403d436bf6e39d4b16bb000645c4bb
2023-12-04Main Compliance FP16 support - generate and verify.Jeremy Johnson
FP16 support for all existing operators for compliance: * DOT_PRODUCT * ULP * EXACT * ABS_ERROR Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I8d25448a793375b53880da3787d8f839767f02cf
2023-12-04Main Compliance testing support for RESHAPEJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I750ef5d3c95daca10e7717437ed375a81b434582
2023-11-30Main Compliance testing support for CASTJeremy Johnson
Limit CAST input tensor to maximums of output type to avoid saturation and infinity. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I33350a4ce0ec828da7d2e7aa8cd3183a89a97431
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-23Main Compliance testing support for COMPARISON opsJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Id6229cfaccad866b110630119eb045dbf6453bf5
2023-11-16Fix FP16, BF16 data ranges for conformance testsJeremy Johnson
Enable use of data ranges for old data gen path as well as the new generate library path, so that FP16 and BF16 test data is produced within the correct ranges. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I749870a3112f8c3a75f4d16b8322c813fbf977cd