Skip to content

Commit

Permalink
[BUG FIX] gpups slot shuffle fix (PaddlePaddle#77)
Browse files Browse the repository at this point in the history
* [BUG FIX] gpups slot shuffle fix

* [BUG FIX] clear pre input record before

* [BUG FIX] clear pre input record before
  • Loading branch information
wangzhen38 authored Jul 26, 2023
1 parent 9d34771 commit edb55e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion paddle/fluid/framework/data_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,8 @@ void SlotRecordDataset::GetRandomData(
// VLOG(0) << "Begin to get_random data";
for (const auto& rec : slots_shuffle_original_data) {
SlotRecordCandidate rand_rec;
SlotRecord new_rec = rec;
SlotRecord new_rec = make_slotrecord();
*new_rec = *rec;

slots_record_shuffle_rclist_.AddAndGet(rec, &rand_rec);
// VLOG(0) << "shuffle_done";
Expand Down Expand Up @@ -1977,6 +1978,9 @@ inline std::default_random_engine& local_random_engine() {
void SlotRecordDataset::PrepareTrain() {
#ifdef PADDLE_WITH_GLOO
if (enable_heterps_) {
if(slots_shuffle_fea_eval_) {
pre_input_records_.clear();
}
if (pre_input_records_.size() == 0 && input_channel_ != nullptr &&
input_channel_->Size() != 0) {
// channel shuffle
Expand Down

0 comments on commit edb55e3

Please sign in to comment.