提交 38af7bca 编写于 作者: Y Yan Chunwei 提交者: Tao Luo

fix manylinux compile error caused by inference lib (#10994)

* update

* remove warning

* Update test_paddle_inference_api_impl.cc
上级 8c54f1fb
......@@ -140,7 +140,8 @@ std::unique_ptr<PaddlePredictor> PaddlePredictorImpl::Clone() {
LOG(ERROR) << "fail to call InitShared";
return nullptr;
}
return cls;
// fix manylinux compile error.
return std::move(cls);
}
// TODO(panyx0718): Consider merge with Init()?
......
......@@ -68,11 +68,11 @@ TEST(paddle_inference_api_impl, word2vec) {
std::vector<PaddleTensor> outputs;
ASSERT_TRUE(predictor->Run(cpu_feeds, &outputs));
ASSERT_EQ(outputs.size(), 1);
ASSERT_EQ(outputs.size(), 1UL);
for (size_t i = 0; i < outputs.size(); ++i) {
size_t len = outputs[i].data.length;
float* data = static_cast<float*>(outputs[i].data.data);
for (int j = 0; j < len / sizeof(float); ++j) {
for (size_t j = 0; j < len / sizeof(float); ++j) {
ASSERT_LT(data[j], 1.0);
ASSERT_GT(data[j], -1.0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册