diff options
author | Kevin Cheng <kevin.cheng@arm.com> | 2021-01-22 17:21:02 -0800 |
---|---|---|
committer | Kevin Cheng <kevin.cheng@arm.com> | 2021-02-01 14:19:58 -0800 |
commit | 3a4785772a0f076e2e9653ad70dbb2fc412ac302 (patch) | |
tree | 5260a30572f8359421a410ba4f2cc7512e1e773c /reference_model/src/ops/type_conversion.cc | |
parent | e2e13cda4c71f9d72935107bbea9a97df779e347 (diff) | |
download | reference_model-3a4785772a0f076e2e9653ad70dbb2fc412ac302.tar.gz |
Remove AINT8
- Updated C and Py serialization libraries, updated licence files
- Removed AINT8 from TOSA reference tests
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Signed-off-by: Jared Smolens <jared.smolens@arm.com>
Change-Id: I860bfeaad5a075e50f569c8f6861927ebacf1378
Diffstat (limited to 'reference_model/src/ops/type_conversion.cc')
-rw-r--r-- | reference_model/src/ops/type_conversion.cc | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/reference_model/src/ops/type_conversion.cc b/reference_model/src/ops/type_conversion.cc index c505e29..3a610ea 100644 --- a/reference_model/src/ops/type_conversion.cc +++ b/reference_model/src/ops/type_conversion.cc @@ -1,5 +1,5 @@ -// Copyright (c) 2020, ARM Limited. +// Copyright (c) 2020-2021, ARM Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -75,24 +75,6 @@ int OpRescale<Rank, InDtype, OutDtype>::eval() bool double_round = attribute->double_round(); bool per_channel = attribute->per_channel(); - if (TosaReference::TypeChecker::is_symmetric(InDtype)) - { - if (input_zp != 0) - { - FATAL_ERROR_NODE("input tensor is symmetric type %s but zeropoint is %d instead of 0", - EnumNamesDType()[InDtype], input_zp); - } - } - - if (TosaReference::TypeChecker::is_symmetric(OutDtype)) - { - if (output_zp != 0) - { - FATAL_ERROR_NODE("output tensor is symmetric type %s but zeropoint is %d instead of 0", - EnumNamesDType()[OutDtype], output_zp); - } - } - // reshape [d0, d1, ..., dn] into [d0 * d1 ..., dn] Eigen::array<Eigen::Index, 2> shape_2d; shape_2d[0] = 1; @@ -222,8 +204,6 @@ CastHelper<InDtype, OutDtype>::CastHelper() { fcn = [](InEigenType in) -> OutEigenType { OutEigenType out = (OutEigenType)in; // implicit sign_extend() if sizeof(out_t) >= sizeof(in_t) - int64_t mask = (1L << OutBits) - 1; - out = out & mask; return out; }; } @@ -283,17 +263,17 @@ DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpCast, FLOAT, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpCast, FLOAT, INT16); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpCast, FLOAT, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, AINT8, AINT8); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, AINT8, INT16); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, AINT8, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT16, AINT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT8, INT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT8, INT16); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT8, INT32); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT16, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT16, INT16); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT16, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT32, AINT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT32, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT32, INT16); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT32, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT48, AINT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT48, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT48, INT16); DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT48, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, UINT8, AINT8); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, AINT8, UINT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, UINT8, INT8); +DEF_INSTANTIATE_RANK0_6_ONE_RANK_TWO_TYPE(OpRescale, INT8, UINT8); |