diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2022-04-05 14:31:37 +0100 |
---|---|---|
committer | Jeremy Johnson <jeremy.johnson@arm.com> | 2022-04-05 16:05:19 +0100 |
commit | 7de9b456620c0b9df20c1bed466779149c4112fd (patch) | |
tree | b78712e4530feb7cddfd17d92c75334d0d698db9 /reference_model/src/ops/reduction.h | |
parent | 5d1a347fc2d34f0aba9ac24d3e17d05292d727f0 (diff) | |
download | reference_model-7de9b456620c0b9df20c1bed466779149c4112fd.tar.gz |
Add missing REQUIREs check to REDUCE_SUM in refmodel
And limit REDUCE_SUM test values to within int32
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: I4d902b245d17eb343cfb2bbc23d9db28c1d1f4c3
Diffstat (limited to 'reference_model/src/ops/reduction.h')
-rw-r--r-- | reference_model/src/ops/reduction.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/reference_model/src/ops/reduction.h b/reference_model/src/ops/reduction.h index f4e29b9..f3407f4 100644 --- a/reference_model/src/ops/reduction.h +++ b/reference_model/src/ops/reduction.h @@ -104,6 +104,16 @@ public: virtual int eval(); }; +template <int Rank, DType Dtype> +class OpReduceSumInt : public ReduceNode<Rank, Dtype> +{ +public: + OpReduceSumInt(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, TosaQuantInfoBase* qinfo_, uint64_t id_) + : ReduceNode<Rank, Dtype>(sgt_, Op_REDUCE_SUM, attribute_, id_) + {} + virtual int eval(); +}; + }; // namespace TosaReference #endif |