Skip to content
This project is mirrored from https://review.mlplatform.org/tosa/reference_model. Pull mirroring updated .
  1. Jul 16, 2024
  2. Jul 15, 2024
  3. Jul 11, 2024
    • Tai Ly's avatar
      Adjust conformance bounds for acc_type changes · a94fc080
      Tai Ly authored and Eric Kunze's avatar Eric Kunze committed
      
      
      This implements 2 changes for conformance bounds as a result
      of spec changes for acc_type for convolution operators.
      
      1. In validateElement():
      OLD: fp64_t out_err_bnd = max(out_bnd * exp2(-1-normal_frac<acc_t>()),
      			      normal_min<acc_t>());
      NEW: fp64_t out_err_bnd = max(out_bnd * exp2(-1-normal_frac<out_t>()),
      			      normal_min<out_t>());
      
      2. In tensorComplianceMetaData:
      OLD: size_t ksb = (max_value(bias_abs) > 0) ? (KS + 1) : KS;
      NEW: size ksb = ceil(KS / exp2(normal_frac<acc_t>() -
      			       normal_frac<out_t>())) +
                      ((max_value(bias_abs) > 0) ? 1 : 0);
      
      Also, adjusted ref model calculations for Conv3d, DepthwiseConv2d,
      TransposeConv2d to use acc_type to do accumulation of multiplies,
      cast results to out_type, and then add bias values in out_type.
      
      Did not adjust Conv2d calculations because it already does this.
      
      Signed-off-by: default avatarTai Ly <tai.ly@arm.com>
      Change-Id: Ic9f64f4d61120f690f1993cf72669867a6c96edf
      a94fc080
  4. Jul 10, 2024
  5. Jul 09, 2024
  6. Jul 04, 2024
    • Jeremy Johnson's avatar
      Add Random to FP Special data gen · 43e4e250
      Jeremy Johnson authored
      
      
      Extend ADD operator FP Special tests to use random
      
      Signed-off-by: Jeremy Johnson's avatarJeremy Johnson <jeremy.johnson@arm.com>
      Change-Id: Ia81967ac6fe546d39b21c1e523a3b8bd53c3b770
      43e4e250
    • Ian Tayler Lessa's avatar
      Extend SPECIAL data gen mode to Tensor ops · 4afb4900
      Ian Tayler Lessa authored
      
      
      By evacha01 <evan.chandler@arm.com>:
      
      Includes FP_SPECIAL mode for many ops, and adds a "broadcastable"
      attribute to avoid fixing the shapes of operations that don't need it.
      
      By iantay01 <ian.taylerlessa@arm.com>:
      
      Fixes the comparison of special values to ignore sign of 0 and avoids
      MIN/MAX float values for operations in which they overflow.
      
      Changes a warning that was raised when no `_s0` test existed
      to instead only warn if _s0` doesn't exist but some `_sN` does. This
      allows for tests that would not make sense for dot products due to a
      small sample size in the statistical analysis, but could still be done
      for fp_special where no statistical analysis is performed.
      
      Changes the padding value in OpMaxPool2d from `-max` to `-inf` in
      floating point types. In the future, a more thorough check of other
      uses of `-max` and `+max` in place of `-inf` and `+inf` should be
      performed.
      
      Implements a `DtypeLimits` template struct similar to
      `std::numeric_limits` to support the proper limits for the floating
      point types we have as dtypes but have not implemented as a C++ type
      in the reference model yet.
      
      Re-implements max_pool2d and argmax by hand to circumvent bug in Eigen's
      argmax that was failing to recognize `-max` as the maximum value in an
      axis with otherwise only `-inf`.
      
      Co-authored-by: Evan Chandler's avatarevacha01 <evan.chandler@arm.com>
      Signed-off-by: Ian Tayler Lessa's avatarIanTayler <ian.taylerlessa@arm.com>
      Change-Id: I429aea90a962d9ff2fd2eb45cc9d6c8f5bf702ec
      4afb4900
  7. Jul 02, 2024
  8. Jul 01, 2024
    • Jeremy Johnson's avatar
      Fix FP special tests to not broadcast · 4e9daee1
      Jeremy Johnson authored and Eric Kunze's avatar Eric Kunze committed
      
      
      Broadcasting is not supported by FP special tests as this
      effects the values tested. This changes the code so that the
      shape list updates are seen by the calling generation functions,
      and adds sanity checks to the data generation to enforce this.
      
      Signed-off-by: Jeremy Johnson's avatarJeremy Johnson <jeremy.johnson@arm.com>
      Change-Id: Ia136ebadc1e03c4c61da44fdff3e7dbc3b03e3c8
      4e9daee1
  9. Jun 28, 2024
  10. Jun 26, 2024
  11. Jun 25, 2024
    • Tai Ly's avatar
      Reinterpret results as unsigned if the tf is unsigned · 2b040ee3
      Tai Ly authored
      
      
      If tf/tfl results are unsigned, then recast ref model
      results to the same data type as tf/tfl results before
      comparison
      
      This change allows tosa to use signless integers when
      stripping out quantized data types
      
      Signed-off-by: default avatarTai Ly <tai.ly@arm.com>
      Change-Id: I328af946140e1a9f45ce5d3b93145d64a8e0780f
      2b040ee3
  12. Jun 24, 2024
  13. Jun 20, 2024
    • Tai Ly's avatar
      Adapt to new ResizeAttribute · 0d74d42a
      Tai Ly authored
      
      
      change to use serialization_lib version where ResizeAttribute have
      deprecated scale/offset/border fields
      
      Signed-off-by: default avatarTai Ly <tai.ly@arm.com>
      Change-Id: I8ecb71f274a63456ba57fb3a8fa2e270543fae4f
      0d74d42a
  14. Jun 18, 2024
  15. Jun 17, 2024
  16. Jun 13, 2024
    • Tai Ly's avatar
      Fix rescale for signed inputs · 305266ba
      Tai Ly authored
      
      
      Changed rescale eval to sign extend input_val for i8/i16/i32/i48 data
      types in case inputs come from unsigned rescale outputs
      
      Signed-off-by: default avatarTai Ly <tai.ly@arm.com>
      Change-Id: I8935c9b0069c7a1c84adcac0442db7554773ed92
      305266ba
  17. Jun 12, 2024
    • Jeremy Johnson's avatar
      Fix up refmodel generate unit_tests · 3a34b298
      Jeremy Johnson authored
      
      
      Due to various code changes:
      * Update dot product values after "Update reference generator
      test set calculation"
      * Update FP special values after "Add FP Special FP32 UNARY tests"
      
      Signed-off-by: Jeremy Johnson's avatarJeremy Johnson <jeremy.johnson@arm.com>
      Change-Id: I48e7e3909794ec62530efd8a6d07f766154f33c8
      3a34b298
    • Jeremy Johnson's avatar
      Simplify tosa_ext_profile_ops_info.json · da84df9d
      Jeremy Johnson authored
      
      
      Remove extraneous generator argument directives and re-order
      alphabetically.
      Fix conformance generation of negative tests to cope with new
      argument format (and old format).
      
      Signed-off-by: Jeremy Johnson's avatarJeremy Johnson <jeremy.johnson@arm.com>
      Change-Id: I98ee7007c30d9086ef11df515f3be972e7a83395
      da84df9d
    • Ian Tayler Lessa's avatar
      Add local_bound attribute support to conv ops · 19371477
      Ian Tayler Lessa authored
      
      
      This includes both respecting the local_bound attribute in the reference
      model and generating tests with local_bound=True and local_bound=False
      for floating point types. For non-floating point types, we always set it
      to False.
      
      Signed-off-by: Ian Tayler Lessa's avatarIanTayler <ian.taylerlessa@arm.com>
      Change-Id: Ifa47b6df31b9142835f48da00b595b89c7082734
      19371477
    • Ian Tayler Lessa's avatar
      Update test generator to fix padding in depthwise_conv2d · 1a083b59
      Ian Tayler Lessa authored
      
      
      Previously the padding was only fixed for conv2d. This was not creating
      a problem with the used seed (42) but it already failed to create some
      tests with other seeds and if the rng state was changed by adding code
      using it. This is only a problem for ERROR_IF tests that often only
      search for parameters in a very small parameter space.
      
      Fixing up the padding for ERROR_IF tests made it so that we generated
      too many tests for depthwise_conv2d. To counteract that, the selection
      settings were changed to mimic the behaviour of conv2d --which doesn't
      have this problem-- more closely.
      
      Signed-off-by: Ian Tayler Lessa's avatarIanTayler <ian.taylerlessa@arm.com>
      Change-Id: I4ebf9538c3e3006d7172a1a70e8cb0f0b5e703cf
      1a083b59
  18. Jun 10, 2024
  19. Jun 06, 2024
  20. Jun 03, 2024
  21. May 29, 2024
  22. May 28, 2024
  23. May 22, 2024
    • Leandro Nunes's avatar
      [ref model] Fix pre-commit test to run on linux and macOS · 359fac9c
      Leandro Nunes authored
      Adjust test_run_command_fail_with_stderr to test with `cat` rather
      than `ls`, as `ls` will return different error codes on linux(2)
      and macOS(1), and `cat` will provide same error code under both
      platforms.
      
      Change-Id: I7b178b8da5446e6610b0d5ecded82100be6963c7
      359fac9c
  24. May 17, 2024
  25. May 13, 2024
  26. May 01, 2024
  27. Apr 30, 2024
Loading