forked from mindspore-Ecosystem/mindspore
!19552 Fix dataset log error that dataset doesn't print error log under some scenarios
Merge pull request !19552 from xiefangqi/md_fix_log_print_r1.3
This commit is contained in:
commit
6d26ab6a4e
|
@ -568,8 +568,8 @@ Status DeviceQueueOp::MallocForGPUData(std::vector<device::DataItemGpu> *items,
|
|||
const int32_t &worker_id) {
|
||||
int i = 0;
|
||||
for (auto &sub_item : *items) {
|
||||
RETURN_IF_NOT_OK(pool_[worker_id]->Allocate(sub_item.data_len_, &sub_item.data_ptr_));
|
||||
if (sub_item.data_ptr_ == nullptr) {
|
||||
auto rc = pool_[worker_id]->Allocate(sub_item.data_len_, &sub_item.data_ptr_);
|
||||
if (rc.IsError() || sub_item.data_ptr_ == nullptr) {
|
||||
return Status(StatusCode::kMDOutOfMemory, __LINE__, __FILE__, "Memory malloc failed.");
|
||||
}
|
||||
if (curr_row[i] == nullptr) {
|
||||
|
|
|
@ -213,6 +213,8 @@ void TaskManager::InterruptMaster(const Status &rc) {
|
|||
if (rc.IsError() && master->rc_.IsOk()) {
|
||||
master->rc_ = rc;
|
||||
master->caught_severe_exception_ = true;
|
||||
// Move log error here for some scenarios didn't call GetMasterThreadRc
|
||||
MS_LOG(ERROR) << "Task is terminated with err msg(more detail in info level log):" << master->rc_;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +225,6 @@ Status TaskManager::GetMasterThreadRc() {
|
|||
if (rc.IsError()) {
|
||||
// Reset the state once we retrieve the value.
|
||||
std::lock_guard<std::mutex> lck(master->mux_);
|
||||
MS_LOG(ERROR) << "Task is terminated with err msg(more detail in info level log):" << master->rc_;
|
||||
master->rc_ = Status::OK();
|
||||
master->caught_severe_exception_ = false;
|
||||
master->ResetIntrpState();
|
||||
|
|
Loading…
Reference in New Issue