diff options
author | Eric Kunze <eric.kunze@arm.com> | 2022-06-07 05:20:44 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2022-06-15 11:38:04 -0700 |
commit | b5fabec33abeca2d92c20c7b094fa3f113d0ddd8 (patch) | |
tree | 9c7d946012c7a70a7fcb237daa4376d7b65c6f76 /reference_model/src/ops/data_layout.cc | |
parent | 24594f55ee3bf0e95c764e51b94c3ec7f9cfa54a (diff) | |
download | reference_model-b5fabec33abeca2d92c20c7b094fa3f113d0ddd8.tar.gz |
Remove quantization info from serialization attributes
Any needed information moves into the attributes for each operator.
New serialization library version removes teh quantization information
attributes from the schema
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Icf6165687ab1fd34a01f64c01b0b92b2820e72fa
Diffstat (limited to 'reference_model/src/ops/data_layout.cc')
-rw-r--r-- | reference_model/src/ops/data_layout.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/reference_model/src/ops/data_layout.cc b/reference_model/src/ops/data_layout.cc index 49f53e8..9fe429b 100644 --- a/reference_model/src/ops/data_layout.cc +++ b/reference_model/src/ops/data_layout.cc @@ -23,7 +23,6 @@ using namespace tosa; template <int Rank, DType Dtype> OpConcat<Rank, Dtype>::OpConcat(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_CONCAT, id_) { @@ -124,22 +123,18 @@ int OpConcat<Rank, Dtype>::eval() template <int Rank, DType Dtype> OpPad<Rank, Dtype>::OpPad(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_PAD, id_) { setRequiredOperands(1, 1); setRequiredRank(0, 6); - INIT_QINFO(Pad); INIT_ATTRIBUTE(Pad); } template <int Rank, DType Dtype> OpPad<Rank, Dtype>::~OpPad() { - if (qinfo) - delete qinfo; } template <int Rank, DType Dtype> @@ -177,11 +172,6 @@ int OpPad<Rank, Dtype>::checkTensorAttributes() paddings_array[i] = std::make_pair(pad_front, pad_back); } - if (this->qinfo && Dtype != DType_INT8) - { - ERROR_IF(this->qinfo->input_zp() != 0, "OpPad: zeropoint should be 0"); - } - return 0; } @@ -206,11 +196,6 @@ int OpPad<Rank, Dtype>::eval() break; } - if (this->qinfo && Dtype == DType_INT8) - { - pad_value += (InEigenType)this->qinfo->input_zp(); - } - this->out->getTensor() = this->in->getTensor().pad(this->paddings_array, pad_value); return GraphNode::eval(); @@ -219,7 +204,6 @@ int OpPad<Rank, Dtype>::eval() template <int InRank, int OutRank, DType Dtype> OpReshape<InRank, OutRank, Dtype>::OpReshape(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_RESHAPE, id_) { @@ -315,7 +299,6 @@ int OpReshape<InRank, OutRank, Dtype>::eval() template <int Rank, DType Dtype> OpReverse<Rank, Dtype>::OpReverse(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_REVERSE, id_) { @@ -383,7 +366,6 @@ int OpReverse<Rank, Dtype>::eval() template <int Rank, DType Dtype> OpSlice<Rank, Dtype>::OpSlice(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_SLICE, id_) { @@ -451,7 +433,6 @@ int OpSlice<Rank, Dtype>::eval() template <int Rank, DType Dtype> OpTileBase<Rank, Dtype>::OpTileBase(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_TILE, id_) { @@ -586,7 +567,6 @@ int OpTile<4, Dtype>::eval() template <int Rank, DType Dtype> OpTranspose<Rank, Dtype>::OpTranspose(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_TRANSPOSE, id_) { |