提交 656d9abc 编写于 作者: T TeslaZhao

Update general_response_op, support more types which is out of paddle::paddle_type

上级 f8758895
...@@ -183,6 +183,13 @@ int GeneralResponseOp::inference() { ...@@ -183,6 +183,13 @@ int GeneralResponseOp::inference() {
VLOG(2) << "(logid=" << log_id << ")Prepare float16 var [" VLOG(2) << "(logid=" << log_id << ")Prepare float16 var ["
<< model_config->_fetch_name[idx] << "]."; << model_config->_fetch_name[idx] << "].";
tensor->set_tensor_content(in->at(idx).data.data(), in->at(idx).data.length()); tensor->set_tensor_content(in->at(idx).data.data(), in->at(idx).data.length());
} else {
// dType is not in paddle::PaddleDType, It's not return type of Paddle Inference.
// Copy all fields of Input data to output tensor.
VLOG(2) << "(logid=" << log_id << ")Prepare SPECIAL TYPE=" << dtype << " var ["
<< model_config->_fetch_name[idx] << "].";
tensor->set_elem_type(dtype);
tensor->set_tensor_content(in->at(idx).data.data(), in->at(idx).data.length());
} }
VLOG(2) << "(logid=" << log_id << ") fetch var [" VLOG(2) << "(logid=" << log_id << ") fetch var ["
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册