diff options
author | Kevin Cheng <kevin.cheng@arm.com> | 2021-05-24 17:20:01 -0700 |
---|---|---|
committer | Kevin Cheng <kevin.cheng@arm.com> | 2021-05-24 17:20:21 -0700 |
commit | 571f7182a10a974f1ce993d83b01070153f142cc (patch) | |
tree | 1cdc94294b24ec5d4719219e46d39ddc2e674652 /reference_model/src/ops/ewise_binary.h | |
parent | 47315e1af6947dd93729c6dbd034c7db1af7f312 (diff) | |
download | reference_model-571f7182a10a974f1ce993d83b01070153f142cc.tar.gz |
Support 8-bit TABLE op.
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: If577035d71c5f9970df5b6a78640a3028c3f83c0
Diffstat (limited to 'reference_model/src/ops/ewise_binary.h')
-rw-r--r-- | reference_model/src/ops/ewise_binary.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/reference_model/src/ops/ewise_binary.h b/reference_model/src/ops/ewise_binary.h index 6b9c98d..a5b1059 100644 --- a/reference_model/src/ops/ewise_binary.h +++ b/reference_model/src/ops/ewise_binary.h @@ -176,7 +176,7 @@ protected: TosaMulAttribute* attribute; }; -template <int Rank> +template <int Rank, DType InDtype> class OpTable : public GraphNode { public: @@ -186,9 +186,8 @@ public: virtual int checkTensorAttributes(); virtual int eval(); - static constexpr DType InDtype = DType_INT16; - static constexpr DType TableDtype = DType_INT16; - static constexpr DType OutDtype = DType_INT32; + static constexpr DType TableDtype = (InDtype == DType_INT8) ? DType_INT8 : DType_INT16; + static constexpr DType OutDtype = (InDtype == DType_INT8) ? DType_INT8 : DType_INT32; using InEigenType = typename GetEigenType<InDtype>::type; using TableEigenType = typename GetEigenType<TableDtype>::type; using OutEigenType = typename GetEigenType<OutDtype>::type; |