Skip to content

Commit 0b9abcb

Browse files
Shixiaowei02Superjomn
authored andcommitted
update paddle_inference_api_anakin_engine.cc with cuda sync (#12037)
1 parent a7c1ed1 commit 0b9abcb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddle/contrib/inference/paddle_inference_api_anakin_engine.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ bool PaddleInferenceAnakinPredictor::Run(
5454
LOG(ERROR) << "copy data from CPU to GPU error";
5555
return false;
5656
}
57+
cudaStreamSynchronize(NULL);
5758
}
5859

5960
executor_.prediction();
@@ -76,6 +77,7 @@ bool PaddleInferenceAnakinPredictor::Run(
7677
LOG(ERROR) << "copy data from GPU to CPU error";
7778
return false;
7879
}
80+
cudaStreamSynchronize(NULL);
7981
}
8082
return true;
8183
}

0 commit comments

Comments
 (0)