From d46b4f75146ee63b8e60215abea431d0aa8ea3c4 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 2 Jul 2019 15:04:52 -0700 Subject: [PATCH] Metal: More information on graph processing. PiperOrigin-RevId: 256247206 --- tensorflow/lite/delegates/gpu/metal/compiled_model.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tensorflow/lite/delegates/gpu/metal/compiled_model.cc b/tensorflow/lite/delegates/gpu/metal/compiled_model.cc index 97f8dfc6fa2..872491afdff 100644 --- a/tensorflow/lite/delegates/gpu/metal/compiled_model.cc +++ b/tensorflow/lite/delegates/gpu/metal/compiled_model.cc @@ -573,7 +573,14 @@ Status ValidateOptimizeModel(const std::vector& input_buffers, GetMissingOutputBufferIds(output_buffers, sorted_chains); info.gpu_tasks_count = static_cast(sorted_chains.size()); if (sorted_chains.empty()) { - return InternalError("Empty chains"); + const std::string message = + "No valid operations in the graph.\nInput operations count " + + std::to_string(info.operations_count) + "\nUnused operations " + + std::to_string(info.unused_operations.size()) + "\nUnused inputs " + + std::to_string(info.unused_input_buffer_ids.size()) + + "\nMissing output buffers " + + std::to_string(info.missing_output_buffer_ids.size()); + return InternalError(message); } for (const auto& chain : sorted_chains) output->push_back(FuseChain(chain)); return OkStatus();