@@ -175,7 +175,7 @@ class Shuffler::Progress {
175175
176176 // Check for new chunks in the inbox and send off their metadata.
177177 auto const t0_send_metadata = Clock::now ();
178- for (auto && chunk : shuffler_.outgoing_chunks_ .extract_all_ready ()) {
178+ for (auto && chunk : shuffler_.outgoing_postbox_ .extract_all_ready ()) {
179179 auto dst = shuffler_.partition_owner (shuffler_.comm_ , chunk.pid );
180180 log.trace (" send metadata to " , dst, " : " , chunk);
181181 RAPIDSMPF_EXPECTS (
@@ -282,7 +282,7 @@ class Shuffler::Progress {
282282 chunk.gpu_data =
283283 std::move (allocate_buffer (0 , shuffler_.stream_ , shuffler_.br_ ));
284284 }
285- shuffler_.insert_into_outbox (std::move (chunk));
285+ shuffler_.insert_into_ready_postbox (std::move (chunk));
286286 }
287287 }
288288
@@ -325,7 +325,7 @@ class Shuffler::Progress {
325325 auto chunk = extract_value (in_transit_chunks_, cid);
326326 auto future = extract_value (in_transit_futures_, cid);
327327 chunk.gpu_data = shuffler_.comm_ ->get_gpu_data (std::move (future));
328- shuffler_.insert_into_outbox (std::move (chunk));
328+ shuffler_.insert_into_ready_postbox (std::move (chunk));
329329 }
330330 }
331331
@@ -356,7 +356,7 @@ class Shuffler::Progress {
356356 || !(
357357 fire_and_forget_.empty () && incoming_chunks_.empty ()
358358 && outgoing_chunks_.empty () && in_transit_chunks_.empty ()
359- && in_transit_futures_.empty () && shuffler_.outgoing_chunks_ .empty ()
359+ && in_transit_futures_.empty () && shuffler_.outgoing_postbox_ .empty ()
360360 ))
361361 ? ProgressThread::ProgressState::InProgress
362362 : ProgressThread::ProgressState::Done;
@@ -404,13 +404,13 @@ Shuffler::Shuffler(
404404 partition_owner{partition_owner},
405405 stream_{stream},
406406 br_{br},
407- outgoing_chunks_ {
407+ outgoing_postbox_ {
408408 [this ](PartID pid) -> Rank {
409409 return this ->partition_owner (this ->comm_ , pid);
410410 }, // extract Rank from pid
411411 static_cast <std::size_t >(comm->nranks ())
412412 },
413- received_chunks_ {
413+ ready_postbox_ {
414414 [](PartID pid) -> PartID { return pid; }, // identity mapping
415415 static_cast <std::size_t >(total_num_partitions),
416416 },
@@ -459,14 +459,14 @@ void Shuffler::shutdown() {
459459 }
460460}
461461
462- void Shuffler::insert_into_outbox (detail::Chunk&& chunk) {
462+ void Shuffler::insert_into_ready_postbox (detail::Chunk&& chunk) {
463463 auto & log = comm_->logger ();
464464 log.trace (" insert_into_outbox: " , chunk);
465465 auto pid = chunk.pid ;
466466 if (chunk.expected_num_chunks ) {
467467 finish_counter_.move_goalpost (chunk.pid , chunk.expected_num_chunks );
468468 } else {
469- received_chunks_ .insert (std::move (chunk));
469+ ready_postbox_ .insert (std::move (chunk));
470470 }
471471 finish_counter_.add_finished_chunk (pid);
472472}
@@ -481,9 +481,9 @@ void Shuffler::insert(detail::Chunk&& chunk) {
481481 statistics_->add_bytes_stat (" shuffle-payload-send" , chunk.gpu_data ->size );
482482 statistics_->add_bytes_stat (" shuffle-payload-recv" , chunk.gpu_data ->size );
483483 }
484- insert_into_outbox (std::move (chunk));
484+ insert_into_ready_postbox (std::move (chunk));
485485 } else {
486- outgoing_chunks_ .insert (std::move (chunk));
486+ outgoing_postbox_ .insert (std::move (chunk));
487487 }
488488}
489489
@@ -555,7 +555,7 @@ std::vector<PackedData> Shuffler::extract(PartID pid) {
555555 // Protect the chunk extraction to make sure we don't get a chunk
556556 // `Shuffler::spill` is in the process of spilling.
557557 std::unique_lock<std::mutex> lock (outbox_spilling_mutex_);
558- auto chunks = received_chunks_ .extract (pid);
558+ auto chunks = ready_postbox_ .extract (pid);
559559 lock.unlock ();
560560 std::vector<PackedData> ret;
561561 ret.reserve (chunks.size ());
@@ -610,7 +610,7 @@ std::size_t Shuffler::spill(std::optional<std::size_t> amount) {
610610 if (spill_need > 0 ) {
611611 std::lock_guard<std::mutex> lock (outbox_spilling_mutex_);
612612 spilled =
613- postbox_spilling (br_, comm_->logger (), stream_, received_chunks_ , spill_need);
613+ postbox_spilling (br_, comm_->logger (), stream_, ready_postbox_ , spill_need);
614614 }
615615 return spilled;
616616}
@@ -625,7 +625,7 @@ detail::ChunkID Shuffler::get_new_cid() {
625625
626626std::string Shuffler::str () const {
627627 std::stringstream ss;
628- ss << " Shuffler(outgoing=" << outgoing_chunks_ << " , received=" << received_chunks_
628+ ss << " Shuffler(outgoing=" << outgoing_postbox_ << " , received=" << ready_postbox_
629629 << " , " << finish_counter_;
630630 return ss.str ();
631631}
0 commit comments