Skip to content

Commit

Permalink
add include conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiyueXu77 committed Jul 26, 2024
1 parent 32c3014 commit 7df5955
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tree/updater_gpu_hist.cu
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ struct GPUHistMakerDevice {

monitor.Stop(__func__);
}
#else
LOG(FATAL) << error::NoFederated();
#endif

/**
Expand Down Expand Up @@ -622,6 +624,8 @@ struct GPUHistMakerDevice {
if (collective::IsDistributed() && info_.IsRowSplit() && collective::IsEncrypted()) {
#if defined(XGBOOST_USE_FEDERATED)
this->AllReduceHistEncrypted(hist_nidx.at(0), hist_nidx.size());
#else
LOG(FATAL) << error::NoFederated();
#endif
} else {
this->AllReduceHist(hist_nidx.at(0), hist_nidx.size());
Expand All @@ -638,6 +642,8 @@ struct GPUHistMakerDevice {
if (collective::IsDistributed() && info_.IsRowSplit() && collective::IsEncrypted()) {
#if defined(XGBOOST_USE_FEDERATED)
this->AllReduceHistEncrypted(subtraction_trick_nidx, 1);
#else
LOG(FATAL) << error::NoFederated();
#endif
} else {
this->AllReduceHist(subtraction_trick_nidx, 1);
Expand Down Expand Up @@ -718,6 +724,8 @@ struct GPUHistMakerDevice {
if (collective::IsDistributed() && info_.IsRowSplit() && collective::IsEncrypted()) {
#if defined(XGBOOST_USE_FEDERATED)
this->AllReduceHistEncrypted(kRootNIdx, 1);
#else
LOG(FATAL) << error::NoFederated();
#endif
} else {
this->AllReduceHist(kRootNIdx, 1);
Expand Down

0 comments on commit 7df5955

Please sign in to comment.