提交 8095fb5e 编写于 作者: S sneaxiy

fix code bug in CPU compilation

test=develop
上级 387bac46
......@@ -97,8 +97,8 @@ std::unique_ptr<ir::Graph> ParallelExecutorPrivate::PrepareGCAndRefCnts(
if (gcs_.count(place) > 0) {
continue;
}
#ifdef PADDLE_WITH_CUDA
GarbageCollector<Tensor> *gc = nullptr;
#ifdef PADDLE_WITH_CUDA
if (platform::is_gpu_place(place)) {
if (IsFastEagerDeletionModeEnabled()) {
gc = new UnsafeFastGPUGarbageCollector<Tensor>(
......@@ -122,7 +122,7 @@ std::unique_ptr<ir::Graph> ParallelExecutorPrivate::PrepareGCAndRefCnts(
}
}
if (gcs_.empty()) {
if (!gcs_.empty()) {
std::vector<details::LastLiveOpsOfVars> last_live_ops_of_vars;
auto ref_cnt_pass =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册