Fix for prev_tensor error_code and async dump creating non-existing root_graph_id directories.

This commit is contained in:
Parastoo Ashtari 2021-07-21 17:38:01 -04:00
parent f250695387
commit f43e4bd265
2 changed files with 7 additions and 3 deletions

View File

@ -1127,9 +1127,13 @@ void AscendSession::Execute(const std::shared_ptr<KernelGraph> &kernel_graph, bo
}
auto runtime_instance = device::KernelRuntimeManager::Instance().GetKernelRuntime(kAscendDevice, device_id_);
MS_EXCEPTION_IF_NULL(runtime_instance);
DumpSetup(kernel_graph);
if (is_task) {
DumpSetup(kernel_graph);
}
bool ret_ok = runtime_instance->Run(kernel_graph.get(), is_task_sink);
Dump(kernel_graph);
if (is_task) {
Dump(kernel_graph);
}
if (!ret_ok) {
#ifdef ENABLE_DUMP_IR
mindspore::RDR::TriggerAll();

View File

@ -128,7 +128,7 @@ std::unique_ptr<ITensorSummary> GetSummaryPtr(const std::shared_ptr<TensorData>
void *DebugServices::GetPrevTensor(const std::shared_ptr<TensorData> &tensor, bool previous_iter_tensor_needed) {
void *previous_tensor_ptr = nullptr;
std::shared_ptr<TensorData> tensor_prev;
if (previous_iter_tensor_needed && tensor->GetIteration() > 1) {
if (previous_iter_tensor_needed && tensor->GetIteration() >= 1) {
// read data in offline mode
std::vector<std::string> file_paths;
if (!is_sync_mode) {