diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc index 43b988ce82..a3eab9910a 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc @@ -38,7 +38,8 @@ DeviceQueueOp::DeviceQueueOp(std::string channel_name, DeviceType device_type, i send_finished_(false), total_batch_(total_batch), create_data_info_queue_(create_data_info_queue), - data_info_queue_ptr_(nullptr) { + data_info_queue_ptr_(nullptr), + first_push_flag_(false) { #ifdef ENABLE_GPUQUE // Get the total device num of current machine int32_t device_count = 0; @@ -172,6 +173,10 @@ Status DeviceQueueOp::SendDataToAscend() { md_channel_info_->RecordPushStartTime(); #endif RETURN_IF_NOT_OK(SendRowToTdt(curr_row, isProfilingEnable, &tdt_cost)); + if (first_push_flag_ != true) { + MS_LOG(INFO) << "Loading dataset and push first batch into device successful"; + first_push_flag_ = true; + } ProfilingRecorder(isProfilingEnable, profiling_node, send_batch, tdt_cost, &batch_start_time, &end_time, connector_capacity, connector_size); send_batch++; @@ -486,6 +491,10 @@ Status DeviceQueueOp::SendDataToGPU() { while (!current_row.eoe() && !is_break_loop && !GpuBufferMgr::GetInstance().IsClosed()) { RETURN_IF_NOT_OK(CheckExceptions(current_row)); RETURN_IF_NOT_OK(receive_queues_[num_buf++ % num_workers_]->Add(std::move(current_row))); + if (first_push_flag_ != true) { + MS_LOG(INFO) << "Loading dataset and push first batch into device successful"; + first_push_flag_ = true; + } if (!TaskManager::FindMe()->Interrupted() && !GpuBufferMgr::GetInstance().IsClosed()) { RETURN_IF_NOT_OK(child_iterator_->FetchNextTensorRow(¤t_row)); } else { diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h index 91ef088b0b..054bfb3b8a 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h @@ -238,6 +238,8 @@ class DeviceQueueOp : public PipelineOp { #ifdef ENABLE_TDTQUE std::shared_ptr tdtInstancePtr; #endif + + bool first_push_flag_; // default: false, when first push, it will be true }; } // namespace dataset } // namespace mindspore