Browse Source

!384 add qos attr

Merge pull request !384 from wangjiming/feature
pull/363/head
i-robot Gitee 4 years ago
parent
commit
95fa979f19
2 changed files with 8 additions and 3 deletions
  1. +1
    -1
      metadef
  2. +7
    -2
      parser/tensorflow/tensorflow_parser.cc

+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit ccb536ecd63934d67be51ed4f96ae8e67cef7c69
Subproject commit 70258340ab9a4bb4fe65f0c12afe3dc7c1d92f4a

+ 7
- 2
parser/tensorflow/tensorflow_parser.cc View File

@@ -429,11 +429,11 @@ Status TensorFlowModelParser::TransNodeToOpDesc(const domi::tensorflow::NodeDef
} else {
op = ge::OpDescUtils::GetOpDescFromOperator(op_factory);
GE_CHECK_NOTNULL(op);
GELOGI("After GetOpDescFromOperator op[%s]: type[%s] have input size: %zu, output size: %zu", op->GetName().c_str(),
GELOGI("After GetOpDescFromOperator op[%s]: type[%s] has input size: %zu, output size: %zu", op->GetName().c_str(),
op->GetType().c_str(), op->GetInputsSize(), op->GetOutputsSize());

GE_RETURN_IF_ERROR(AddTensorDescToOpDesc(op, node_def));
GELOGI("After AddTensorDescToOpDesc op[%s]: type[%s] have input size: %zu, output size: %zu", op->GetName().c_str(),
GELOGI("After AddTensorDescToOpDesc op[%s]: type[%s] has input size: %zu, output size: %zu", op->GetName().c_str(),
op->GetType().c_str(), op->GetInputsSize(), op->GetOutputsSize());
}
op_factory.BreakConnect();
@@ -477,6 +477,11 @@ Status TensorFlowModelParser::ParseOpParams(const domi::tensorflow::NodeDef *nod
return status;
}
}
domi::tensorflow::AttrValue attr;
if (ge::TensorFlowUtil::FindAttrValue(node_def, ATTR_NAME_QOS_SERVICE_LABEL, attr)) {
(void)ge::AttrUtils::SetInt(*op, ATTR_NAME_QOS_SERVICE_LABEL, static_cast<int64_t>(attr.i()));
}

return SUCCESS;
}



Loading…
Cancel
Save