Skip to content
Commit a94fc080 authored by Tai Ly's avatar Tai Ly Committed by Eric Kunze
Browse files

Adjust conformance bounds for acc_type changes



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
parent eec59707
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment