Skip to content

Commit

Permalink
[NewComm] Fix hogwild_worker compilation problem of unused variable. (P…
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostScreaming authored and jiahy0825 committed Oct 16, 2023
1 parent 005ecc6 commit 1b8c192
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions paddle/fluid/framework/hogwild_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ bool HogwildWorker::CheckBatchNum(int flag) {
}
g_barrier.wait();
float *stat_ptr = sync_stat_.data<float>();
int nranks = 0;
int ring_id = 0;
platform::NCCLComm *comm = nullptr;
const auto &comm_context_manager =
Expand All @@ -181,11 +180,9 @@ bool HogwildWorker::CheckBatchNum(int flag) {
platform::errors::Unavailable(
"NCCLCommContext is nullptr, collective op should "
"has ring_id attr."));
nranks = comm_ctx->GetSize();
} else {
comm = platform::NCCLCommContext::Instance().Get(ring_id,
place_.GetDeviceId());
nranks = comm->nranks();
}

auto stream = static_cast<phi::GPUContext *>(dev_ctx_)->stream();
Expand Down

0 comments on commit 1b8c192

Please sign in to comment.