提交 2efc8755 编写于 作者: X xulongteng

Merge branch 'bert' of https://github.com/MRXLT/Serving into bert

......@@ -94,6 +94,7 @@ int create_req(Request* req,
}
}
ins->set_max_seq_len(max_seq_len);
ins->set_emb_size(emb_size);
}
return 0;
}
......
......@@ -127,13 +127,13 @@ int BertServiceOp::inference() {
#if 0 // print request
std::ostringstream oss;
for (int j = 0; j < 3; j++) {
int64_t* example = reinterpret_cast<int64_t*>(*in)[j].data.data();
int64_t* example = reinterpret_cast<int64_t*>((*in)[j].data.data());
for (uint32_t i = 0; i < MAX_SEQ_LEN; i++) {
oss << *(example + i) << " ";
}
oss << ";";
}
float* example = reinterpret_cast<float*>(*in)[3].data.data();
float* example = reinterpret_cast<float*>((*in)[3].data.data());
for (int i = 0; i < MAX_SEQ_LEN; i++) {
oss << *(example + i) << " ";
}
......
......@@ -38,7 +38,7 @@ message BertResInstance { repeated Embedding_values instances = 1; };
message Response {
repeated BertResInstance instances = 1;
optional int64 op_time = 2;
optional int64 infert_time = 3;
optional int64 infer_time = 3;
};
service BertService {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册