From b5fabec33abeca2d92c20c7b094fa3f113d0ddd8 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Tue, 7 Jun 2022 05:20:44 +0000 Subject: 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 Change-Id: Icf6165687ab1fd34a01f64c01b0b92b2820e72fa --- reference_model/src/ops/data_layout.cc | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'reference_model/src/ops/data_layout.cc') 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 OpConcat::OpConcat(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_CONCAT, id_) { @@ -124,22 +123,18 @@ int OpConcat::eval() template OpPad::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 OpPad::~OpPad() { - if (qinfo) - delete qinfo; } template @@ -177,11 +172,6 @@ int OpPad::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::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::eval() template OpReshape::OpReshape(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_RESHAPE, id_) { @@ -315,7 +299,6 @@ int OpReshape::eval() template OpReverse::OpReverse(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_REVERSE, id_) { @@ -383,7 +366,6 @@ int OpReverse::eval() template OpSlice::OpSlice(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_SLICE, id_) { @@ -451,7 +433,6 @@ int OpSlice::eval() template OpTileBase::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 OpTranspose::OpTranspose(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, - TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(sgt_, Op_TRANSPOSE, id_) { -- cgit v1.2.1