diff --git a/demo-client/src/bert_service.cpp b/demo-client/src/bert_service.cpp index 11a5276fd3ff653f8a2d6127bdcc471e4ba5b07b..f272078698e9921c0fad0b65666589d4c8c6a2e6 100644 --- a/demo-client/src/bert_service.cpp +++ b/demo-client/src/bert_service.cpp @@ -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; } diff --git a/demo-serving/op/bert_service_op.cpp b/demo-serving/op/bert_service_op.cpp index f4713782bf54e894efdf391c05231d77accf7019..f34d113a59fc79a7badaaf75f3b839e3200c89f6 100644 --- a/demo-serving/op/bert_service_op.cpp +++ b/demo-serving/op/bert_service_op.cpp @@ -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(*in)[j].data.data(); + int64_t* example = reinterpret_cast((*in)[j].data.data()); for (uint32_t i = 0; i < MAX_SEQ_LEN; i++) { oss << *(example + i) << " "; } oss << ";"; } - float* example = reinterpret_cast(*in)[3].data.data(); + float* example = reinterpret_cast((*in)[3].data.data()); for (int i = 0; i < MAX_SEQ_LEN; i++) { oss << *(example + i) << " "; } diff --git a/sdk-cpp/proto/bert_service.proto b/sdk-cpp/proto/bert_service.proto index fbf07e705985a336333984622a00007667d67dd3..01168560e1d1fb698e326a966aeb553decbf538c 100644 --- a/sdk-cpp/proto/bert_service.proto +++ b/sdk-cpp/proto/bert_service.proto @@ -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 {