diff --git a/lite/kernels/mlu/bridges/graph.h b/lite/kernels/mlu/bridges/graph.h index 0c7ca7db836913570391c52944810c2aed557d75..7a4f2af6e5fa0df782aa8c05ebfc38222aab91fa 100644 --- a/lite/kernels/mlu/bridges/graph.h +++ b/lite/kernels/mlu/bridges/graph.h @@ -54,11 +54,13 @@ class Graph { CNRT_CALL(cnrtDestroyNotifier(¬ifier_start_)); CNRT_CALL(cnrtDestroyNotifier(¬ifier_end_)); double total_time = 0; - for (auto& f : time_log_) { - total_time += f; + if (!time_log_.empty()) { + for (auto& f : time_log_) { + total_time += f; + } + std::cout << "cnml hardware time for " << time_log_.size() + << " process:" << total_time / time_log_.size() << std::endl; } - std::cout << "cnml hardware time for " << time_log_.size() - << " process:" << total_time / time_log_.size() << std::endl; #endif } // Data node diff --git a/lite/kernels/mlu/subgraph_compute.h b/lite/kernels/mlu/subgraph_compute.h index 971b83027f9551dca084239944a6105c9fbbd552..ec9b69ebcb4f32f587de070aa8ab63ae1cedda13 100644 --- a/lite/kernels/mlu/subgraph_compute.h +++ b/lite/kernels/mlu/subgraph_compute.h @@ -55,6 +55,8 @@ class SubgraphEngine : public subgraph::Engine { << GetBoolFromEnv("PADDLE_LITE_MLU_SAVE_OFFLINE_MODEL"); VLOG(4) << "[MLU] PADDLE_LITE_MLU_DISABLE_BATCH_SIZE_CHANGEABLE is " << GetBoolFromEnv("PADDLE_LITE_MLU_DISABLE_BATCH_SIZE_CHANGEABLE"); + VLOG(4) << "[MLU] LITE_DISABLE_MLU_CAST is " + << GetBoolFromEnv("LITE_DISABLE_MLU_CAST"); if (GetBoolFromEnv("PADDLE_LITE_MLU_DISABLE_BATCH_SIZE_CHANGEABLE")) { disable_batch_size_changeable_ = true; } @@ -105,6 +107,7 @@ class SubgraphEngine : public subgraph::Engine { if (shape_graph_map_.count(inputs_shape_) > 0) { return false; } + VLOG(3) << "MLU graph input shape changed" << std::endl; return true; } @@ -131,8 +134,8 @@ class SubgraphEngine : public subgraph::Engine { if (subgraph::CHECK_SUCCESS(status)) { return status; } - VLOG(4) << "[MLU] build batch_size changeable subgraph op failed, " - "changed to input_shape changeable"; + LOG(INFO) << "[MLU] build batch_size changeable subgraph op failed, " + "changed to input_shape changeable"; } error_compile_batch_size_changeable_ = true; disable_batch_size_changeable_ = true;