Skip to content

Commit fd0caf0

Browse files
committed
remove debug log
1 parent 69a2c2b commit fd0caf0

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
lines changed

paddle/fluid/distributed/collective/process_group_flagcx.cc

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,12 @@ phi::DeviceContext* ProcessGroupFlagcx::GetDeviceContext(
187187
}
188188

189189
flagcxComm_t ProcessGroupFlagcx::FlagcxComm(const Place& place) const {
190-
PADDLE_ENFORCE_NOT_NULL(flagcx_comm_);
190+
PADDLE_ENFORCE_NOT_NULL(flagcx_comm_, ::common::errors::InvalidArgument("flagcx_comm_ is nullptr"));
191191
return flagcx_comm_;
192192
}
193193

194194
phi::distributed::FlagcxCommContext* ProcessGroupFlagcx::GetOrCreateCommContext(
195195
const Place& place, CommType comm_type) {
196-
VLOG(3) << "flagcx debug: entered ProcessGroupFlagcx::GetOrCreateCommContext";
197196
const auto& key = GetKeyFromPlace(place);
198197
std::string store_key;
199198
GetStoreKey(key, comm_type, &store_key);
@@ -245,11 +244,8 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::AllReduce(
245244
const AllreduceOptions& opts,
246245
bool sync_op,
247246
bool use_calc_stream) {
248-
VLOG(3) << "flagcx debug: entered ProcessGroupFlagcx::AllReduce" <<
249-
" sync_op: " << sync_op << "use_calc_stream: " << use_calc_stream;
250247
CheckTensorContiguous(in_tensor);
251248
CheckTensorContiguous(*out_tensor);
252-
VLOG(3) << "flagcx debug: finished checking input and output tensor";
253249

254250
return Collective(
255251
[&](phi::distributed::FlagcxCommContext* comm_context, flagcxStream_t stream) {
@@ -693,7 +689,6 @@ void ProcessGroupFlagcx::CreateFlagcxEnvCache(const Place& place,
693689
const std::string& store_key,
694690
CommType comm_type,
695691
int p2p_rank) {
696-
VLOG(3) << "flagcx debug: entered ProcessGroupFlagcx::CreateFlagcxEnvCache";
697692
//TODO(changtao): we only support one flagcx comm ctx
698693
if (flagcx_comm_ != nullptr) {
699694
return;
@@ -703,22 +698,19 @@ void ProcessGroupFlagcx::CreateFlagcxEnvCache(const Place& place,
703698
<< ", store_key: " << store_key;
704699
store_key_ = store_key;
705700

706-
VLOG(3) << "flagcx debug: before CreateFlagcxCommContext";
707701
phi::distributed::CommContextManager::CreateFlagcxCommContext(
708702
store_, store_key, rank_, size_, "");
709703

710704

711705
auto flagcx_comm_ctx = this->GetCommContext(&store_key);
712706
VLOG(3) << "Get flagcx comm: " << flagcx_comm_ctx->GetFlagcxComm();
713-
VLOG(3) << "flagcx debug: get flagcx comm";
714707
flagcx_comm_ = flagcx_comm_ctx->GetFlagcxComm();
715708
auto comm_ctx = std::make_unique<phi::GPUContext>(place);
716709

717710

718711
auto* calc_ctx = static_cast<phi::GPUContext*>(
719712
phi::DeviceContextPool::Instance().Get(place));
720713

721-
VLOG(3) << "flagcx debug: adding key to maps";
722714
place_to_calc_event_.emplace(
723715
place_key,
724716
platform::DeviceEvent(place, platform::GenerateDeviceEventFlag()));
@@ -795,78 +787,61 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Collective(
795787
CommType comm_type,
796788
bool sync_op,
797789
bool use_calc_stream) {
798-
VLOG(3) << "flagcx debug: Entered ProcessGroupFlagcx::Collective";
799790
CheckTensorContiguous(tensor);
800-
VLOG(3) << "flagcx debug: finished checking tensor in Collective API";
801791

802792
comm_seq_++;
803793
const auto& place = tensor.place();
804-
VLOG(3) << "flagcx debug: getting key from place";
805794
const auto& key = GetKeyFromPlace(place);
806795

807-
VLOG(3) << "flagcx debug: adding cuda guard to device";
808796
platform::CUDADeviceGuard cuda_guard(place);
809797

810798
std::string store_key;
811-
VLOG(3) << "flagcx debug: getting store key";
812799
GetStoreKey(key, comm_type, &store_key);
813800

814801
if (place_to_comm_ctx_.find(key) == place_to_comm_ctx_.end()) {
815-
VLOG(3) << "flagcx debug: creating flagcx env cache";
816802
CreateFlagcxEnvCache(place, key, store_key, comm_type);
817803
}
818804

819805
if (!use_calc_stream) {
820-
VLOG(3) << "flagcx debug: syncing calc stream";
821806
SyncCalcStream(place, key);
822807
}
823808

824809
auto task =
825810
CreateTask(place, rank_, comm_type, sync_op, use_calc_stream, gid_);
826811

827-
VLOG(3) << "flagcx debug: getting comm context";
828812
const auto& comm_ctx = place_to_comm_ctx_.at(key);
829-
VLOG(3) << "flagcx debug: getting calc context";
830813
const auto* calc_ctx = place_to_calc_ctx_.at(key);
831814

832-
VLOG(3) << "flagcx debug: getting comm context";
833815
auto flagcx_comm_ctx = this->GetCommContext(&store_key);
834816

835817
flagcxStream_t flagcx_stream;
836818
if (use_calc_stream) {
837-
VLOG(3) << "flagcx debug: getting calc stream";
838819
auto calc_stream = calc_ctx->stream();
839820
flagcx_comm_ctx->flagcx_handler_->devHandle->streamCopy(&flagcx_stream, (void *)&calc_stream);
840821
} else {
841-
VLOG(3) << "flagcx debug: getting comm stream";
842822
auto comm_stream = comm_ctx->stream();
843823
flagcx_comm_ctx->flagcx_handler_->devHandle->streamCopy(&flagcx_stream, (void *)&comm_stream);
844824
}
845825

846826
if (!FLAGS_enable_async_trace) {
847-
VLOG(3) << "flagcx debug: calling function";
848827
fn(flagcx_comm_ctx, flagcx_stream);
849828
}
850829

851830
if (!use_calc_stream) {
852831
if (!is_coalescing_) {
853-
VLOG(3) << "flagcx debug: not coalescing, updating wait chain";
854832
task->UpdateWaitChain(*comm_ctx);
855833
allocation_stream_pairs_.emplace_back(tensor.Holder(), *(gpuStream_t*)flagcx_stream);
856834
} else {
857-
VLOG(3) << "flagcx debug: coalescing tensors";
858835
coalescing_tensors_.emplace_back(
859836
std::make_shared<phi::DenseTensor>(tensor));
860837
coalescing_place_keys_.push_back(key);
861838
}
862839
}
863840

864841
if (sync_op) {
865-
VLOG(3) << "flagcx debug: task wait";
866842
task->Wait();
867843
}
868844

869-
VLOG(3) << "flagcx debug: free flagcx tmp stream";
870845
flagcx_comm_ctx->flagcx_handler_->devHandle->streamFree(flagcx_stream);
871846

872847
return task;
@@ -927,11 +902,9 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Point2Point(
927902

928903
flagcxStream_t flagcx_stream;
929904
if (use_calc_stream) {
930-
VLOG(3) << "flagcx debug: getting calc stream";
931905
auto calc_stream = calc_ctx->stream();
932906
flagcx_comm_ctx->flagcx_handler_->devHandle->streamCopy(&flagcx_stream, (void *)&calc_stream);
933907
} else {
934-
VLOG(3) << "flagcx debug: getting comm stream";
935908
auto comm_stream = comm_ctx->stream();
936909
flagcx_comm_ctx->flagcx_handler_->devHandle->streamCopy(&flagcx_stream, (void *)&comm_stream);
937910
}

paddle/phi/core/distributed/comm_context_manager.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ void CommContextManager::CreateFlagcxCommContext(const std::shared_ptr<Store>& s
253253
return;
254254
}
255255
flagcxHandlerGroup_t flagcx_handler;
256-
VLOG(3) << "flagcx debug: flagcxHendleInit";
257256
phi::dynload::flagcxHandleInit(&flagcx_handler);
258257
if (rank == 0) {
259258
phi::dynload::flagcxGetUniqueId(&flagcx_handler->uniqueId);

python/paddle/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,6 @@
653653
set_flags({"FLAGS_nccl_dir": nccl_lib_path})
654654

655655
flagcx_lib_path = os.getenv('FLAGCX_ROOT', '') + "/build/lib"
656-
print(f"flagcx debug: flagcx_lib_path: {flagcx_lib_path}")
657656
set_flags({"FLAGS_flagcx_dir": flagcx_lib_path})
658657

659658
cupti_dir_lib_path = package_dir + "/.." + "/nvidia/cuda_cupti/lib"

0 commit comments

Comments
 (0)