diff --git a/paddle/fluid/framework/fleet/fleet_wrapper.cc b/paddle/fluid/framework/fleet/fleet_wrapper.cc index 7aeb9eaf3f19582d630996c18809503613859714..66c043e137a247a68c8c69a88dd12112ee4786bb 100644 --- a/paddle/fluid/framework/fleet/fleet_wrapper.cc +++ b/paddle/fluid/framework/fleet/fleet_wrapper.cc @@ -1335,7 +1335,7 @@ void FleetWrapper::SaveModelOneTablePrefix(const uint64_t table_id, } void FleetWrapper::SetDate(const uint64_t table_id, const std::string& date) { -#ifdef PADDLE_WITH_PSLIB +#if (defined PADDLE_WITH_PSLIB) && (defined PADDLE_WITH_HETERPS) assert(date.size() == 8); int year = std::stoi(date.substr(0, 4)); int month = std::stoi(date.substr(4, 2)); @@ -1353,7 +1353,7 @@ void FleetWrapper::SetDate(const uint64_t table_id, const std::string& date) { LOG(ERROR) << "setdate : " << date << " failed"; } #else - VLOG(0) << "FleetWrapper::SetDate does nothing when no pslib"; + VLOG(0) << "FleetWrapper::SetDate does nothing when no pslib-gpu"; #endif } @@ -1371,7 +1371,7 @@ void FleetWrapper::PrintTableStat(const uint64_t table_id) { } void FleetWrapper::SetFileNumOneShard(const uint64_t table_id, int file_num) { -#ifdef PADDLE_WITH_PSLIB +#if (defined PADDLE_WITH_PSLIB) && (defined PADDLE_WITH_HETERPS) auto ret = pslib_ptr_->_worker_ptr->set_file_num_one_shard(table_id, file_num); ret.wait(); @@ -1380,7 +1380,7 @@ void FleetWrapper::SetFileNumOneShard(const uint64_t table_id, int file_num) { LOG(ERROR) << "set_file_num_one_shard failed"; } #else - VLOG(0) << "FleetWrapper::SetFileNumOneShard does nothing when no pslib"; + VLOG(0) << "FleetWrapper::SetFileNumOneShard does nothing when no pslib-gpu"; #endif } diff --git a/paddle/fluid/framework/fleet/ps_gpu_wrapper.cc b/paddle/fluid/framework/fleet/ps_gpu_wrapper.cc index 0d0c9048d00f3b49d15a84a9e789260dda7d65b6..7ed35467c5efee10c25f45f0e464ebd30f87336b 100644 --- a/paddle/fluid/framework/fleet/ps_gpu_wrapper.cc +++ b/paddle/fluid/framework/fleet/ps_gpu_wrapper.cc @@ -191,7 +191,7 @@ void PSGPUWrapper::BuildPull(std::shared_ptr gpu_task) { auto fleet_ptr = paddle::distributed::Communicator::GetInstance(); #endif -#ifdef PADDLE_WITH_PSLIB +#if (defined PADDLE_WITH_PSLIB) && (defined PADDLE_WITH_HETERPS) // get day_id: day nums from 1970 struct std::tm b; b.tm_year = year_ - 1900;