diff options
author | TatWai Chong <tatwai.chong@arm.com> | 2024-01-24 22:57:07 -0800 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-01-31 19:09:14 +0000 |
commit | 01f937a27a3b56bca622f94af7201c98dfebeb43 (patch) | |
tree | f5ca356ee8795ef12208d0210d68fed051b0c88e /reference_model/src/ops/data_layout.h | |
parent | 39431cbbbc12d065225a9622ce49b4eaff6c934c (diff) | |
download | reference_model-01f937a27a3b56bca622f94af7201c98dfebeb43.tar.gz |
Change the start and size of slice to tosa shape type
This offers dynamism support for slice op.
Change-Id: I4521c072c663a01e03e575e0cbbc8671c832f646
Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
Diffstat (limited to 'reference_model/src/ops/data_layout.h')
-rw-r--r-- | reference_model/src/ops/data_layout.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/reference_model/src/ops/data_layout.h b/reference_model/src/ops/data_layout.h index e085b8e..6ab5ebd 100644 --- a/reference_model/src/ops/data_layout.h +++ b/reference_model/src/ops/data_layout.h @@ -145,15 +145,18 @@ public: virtual int checkTensorAttributes(); virtual int eval(); - using InEigenType = typename GetEigenType<Dtype>::type; - using OutEigenType = typename GetEigenType<Dtype>::type; - using TIn = Eigen::Tensor<InEigenType, Rank>; - using TOut = Eigen::Tensor<OutEigenType, Rank>; + using InEigenType = typename GetEigenType<Dtype>::type; + using InEigenShapeType = typename GetEigenType<TOSA_REF_TYPE_SHAPE>::type; + using OutEigenType = typename GetEigenType<Dtype>::type; + using TIn = Eigen::Tensor<InEigenType, Rank>; + using TInShape = Eigen::Tensor<InEigenShapeType, 1>; + using TOut = Eigen::Tensor<OutEigenType, Rank>; protected: - TosaSliceAttribute* attribute; Eigen::array<Eigen::Index, Rank> begin_array; Eigen::array<Eigen::Index, Rank> size_array; + TosaReference::TensorTemplate<TInShape>* start; + TosaReference::TensorTemplate<TInShape>* size; TosaReference::TensorTemplate<TIn>* in; TosaReference::TensorTemplate<TOut>* out; }; |