forked from mindspore-Ecosystem/mindspore
Repair some MS_LOG problem
This commit is contained in:
parent
679dbd27b3
commit
c5cfb09e66
|
@ -67,7 +67,7 @@ Status TakeOp::GetNextBuffer(std::unique_ptr<DataBuffer> *p_buffer, int32_t work
|
|||
bool last_repeat = !BitTest(op_ctrl_flags_, kDeOpRepeated) || BitTest(op_ctrl_flags_, kDeOpLastRepeat);
|
||||
if (take_count_ == max_takes_) {
|
||||
if (state_ == OpState::kDeOpRunning) {
|
||||
MS_LOG(INFO) << "meet max count and push-back eoe buffer.";
|
||||
MS_LOG(DEBUG) << "Meet max count and push-back eoe buffer.";
|
||||
auto eoe_buffer = std::make_unique<DataBuffer>(0, DataBuffer::kDeBFlagEOE);
|
||||
*p_buffer = std::move(eoe_buffer);
|
||||
state_ = OpState::kDeOpIdle;
|
||||
|
@ -80,11 +80,13 @@ Status TakeOp::GetNextBuffer(std::unique_ptr<DataBuffer> *p_buffer, int32_t work
|
|||
RETURN_IF_NOT_OK(child_[0]->GetNextBuffer(&buf, worker_id, true));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
MS_LOG(INFO) << "meet max count and push-back eof buffer.";
|
||||
} else if (state_ == OpState::kDeOpIdle) {
|
||||
MS_LOG(DEBUG) << "Meet max count and push-back eof buffer.";
|
||||
auto eof_buffer = std::make_unique<DataBuffer>(0, DataBuffer::kDeBFlagEOF);
|
||||
*p_buffer = std::move(eof_buffer);
|
||||
take_count_ = 0;
|
||||
} else {
|
||||
MS_LOG(WARNING) << "Invalid OpState: " << state_;
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
@ -116,7 +118,7 @@ Status TakeOp::FillBuffer(std::unique_ptr<DataBuffer> *buffer, std::unique_ptr<D
|
|||
*data_buffer = std::move(*buffer);
|
||||
take_count_ = take_count_ + buffer_size;
|
||||
} else {
|
||||
MS_LOG(INFO) << "In last buffer: Push one buffer.";
|
||||
MS_LOG(DEBUG) << "In last buffer: Push one buffer.";
|
||||
std::unique_ptr<TensorQTable> new_tensor_table = std::make_unique<TensorQTable>();
|
||||
while (take_count_ < max_takes_) {
|
||||
TensorRow new_row;
|
||||
|
|
|
@ -69,7 +69,7 @@ TEST_F(MindDataTestTakeOp, TestTakeProject) {
|
|||
rc = my_tree->AssignRoot(my_take_op);
|
||||
ASSERT_TRUE(rc.IsOk());
|
||||
|
||||
MS_LOG(INFO) << "Launching tree and begin iteration.";
|
||||
MS_LOG(DEBUG) << "Launching tree and begin iteration.";
|
||||
rc = my_tree->Prepare();
|
||||
|
||||
ASSERT_TRUE(rc.IsOk());
|
||||
|
@ -85,13 +85,13 @@ TEST_F(MindDataTestTakeOp, TestTakeProject) {
|
|||
|
||||
int row_count = 0;
|
||||
while (!tensor_list.empty()) {
|
||||
MS_LOG(INFO) << "Row display for row #: " << row_count << ".";
|
||||
MS_LOG(DEBUG) << "Row display for row #: " << row_count << ".";
|
||||
|
||||
// Display the tensor by calling the printer on it
|
||||
for (int i = 0; i < tensor_list.size(); i++) {
|
||||
std::ostringstream ss;
|
||||
ss << "(" << tensor_list[i] << "): " << *tensor_list[i] << std::endl;
|
||||
MS_LOG(INFO) << "Tensor print: " << ss.str() << ".";
|
||||
MS_LOG(DEBUG) << "Tensor print: " << ss.str() << ".";
|
||||
}
|
||||
|
||||
rc = di.FetchNextTensorRow(&tensor_list);
|
||||
|
|
Loading…
Reference in New Issue