@@ -22,9 +22,9 @@ limitations under the License. */
22
22
#include " paddle/fluid/inference/tests/test_helper.h"
23
23
24
24
#ifdef __clang__
25
- #define ACC_DIFF 4e-3
25
+ #define ACC_DIFF 4e-2
26
26
#else
27
- #define ACC_DIFF 1e-3
27
+ #define ACC_DIFF 1e-2
28
28
#endif
29
29
30
30
DEFINE_string (dirname, " " , " Directory of the inference model." );
@@ -187,7 +187,7 @@ void MainThreadsWord2Vec(bool use_gpu) {
187
187
std::vector<std::thread> threads;
188
188
for (int tid = 0 ; tid < num_jobs; ++tid) {
189
189
threads.emplace_back ([&, tid]() {
190
- auto predictor = main_predictor-> Clone ( );
190
+ auto predictor = CreatePaddlePredictor (config );
191
191
auto & local_inputs = paddle_tensor_feeds[tid];
192
192
std::vector<PaddleTensor> local_outputs;
193
193
ASSERT_TRUE (predictor->Run (local_inputs, &local_outputs));
@@ -245,7 +245,7 @@ void MainThreadsImageClassification(bool use_gpu) {
245
245
std::vector<std::thread> threads;
246
246
for (int tid = 0 ; tid < num_jobs; ++tid) {
247
247
threads.emplace_back ([&, tid]() {
248
- auto predictor = main_predictor-> Clone ( );
248
+ auto predictor = CreatePaddlePredictor (config );
249
249
auto & local_inputs = paddle_tensor_feeds[tid];
250
250
std::vector<PaddleTensor> local_outputs;
251
251
ASSERT_TRUE (predictor->Run (local_inputs, &local_outputs));
0 commit comments