提交 0b9abcbe 编写于 作者: 石晓伟 提交者: Yan Chunwei

update paddle_inference_api_anakin_engine.cc with cuda sync (#12037)

上级 a7c1ed12
...@@ -54,6 +54,7 @@ bool PaddleInferenceAnakinPredictor::Run( ...@@ -54,6 +54,7 @@ bool PaddleInferenceAnakinPredictor::Run(
LOG(ERROR) << "copy data from CPU to GPU error"; LOG(ERROR) << "copy data from CPU to GPU error";
return false; return false;
} }
cudaStreamSynchronize(NULL);
} }
executor_.prediction(); executor_.prediction();
...@@ -76,6 +77,7 @@ bool PaddleInferenceAnakinPredictor::Run( ...@@ -76,6 +77,7 @@ bool PaddleInferenceAnakinPredictor::Run(
LOG(ERROR) << "copy data from GPU to CPU error"; LOG(ERROR) << "copy data from GPU to CPU error";
return false; return false;
} }
cudaStreamSynchronize(NULL);
} }
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册