helinwang-patch-1
Yu Yang 7 years ago
parent 55e2cc3d87
commit b6ca3711b4

@ -33,6 +33,9 @@ std::string OpHandleBase::DebugString() const {
OpHandleBase::~OpHandleBase() {
#ifdef PADDLE_WITH_CUDA
for (auto &ctx : dev_ctx_) {
ctx.second->Wait();
}
for (auto &ev : events_) {
PADDLE_ENFORCE(cudaEventDestroy(ev.second));
}

Loading…
Cancel
Save