From 2494ee998ae84a7b4085d423a7191b9ad4ef4574 Mon Sep 17 00:00:00 2001 From: Ghost Screaming Date: Wed, 27 Sep 2023 11:16:19 +0800 Subject: [PATCH] [NewComm] Fix hogwild_worker compilation problem of unused variable. (#57781) --- paddle/fluid/framework/hogwild_worker.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/paddle/fluid/framework/hogwild_worker.cc b/paddle/fluid/framework/hogwild_worker.cc index e638fbcb8a54d..08d681ae6411f 100644 --- a/paddle/fluid/framework/hogwild_worker.cc +++ b/paddle/fluid/framework/hogwild_worker.cc @@ -158,7 +158,6 @@ bool HogwildWorker::CheckBatchNum(int flag) { } g_barrier.wait(); float *stat_ptr = sync_stat_.data(); - int nranks = 0; int ring_id = 0; platform::NCCLComm *comm = nullptr; const auto &comm_context_manager = @@ -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(dev_ctx_)->stream();