COMPMID-1310: Create graph validation executables.

Change-Id: I9e0b57b1b83fe5a95777cdaeddba6ecef650bafc
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/138697
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
diff --git a/src/graph/GraphManager.cpp b/src/graph/GraphManager.cpp
index 10661ea..db6650c 100644
--- a/src/graph/GraphManager.cpp
+++ b/src/graph/GraphManager.cpp
@@ -27,6 +27,7 @@
 #include "arm_compute/graph/GraphContext.h"
 #include "arm_compute/graph/Logger.h"
 #include "arm_compute/graph/PassManager.h"
+#include "arm_compute/graph/TypePrinter.h"
 #include "arm_compute/graph/Utils.h"
 #include "arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h"
 #include "arm_compute/graph/detail/ExecutionHelpers.h"
@@ -53,7 +54,12 @@
 
     // Force target to all graph construct
     // TODO (geopin01) : Support heterogeneous execution
-    Target forced_target = is_target_supported(target) ? target : get_default_target();
+    Target forced_target = target;
+    if(!is_target_supported(target))
+    {
+        forced_target = get_default_target();
+        ARM_COMPUTE_LOG_GRAPH_INFO("Switching target from " << target << " to " << forced_target << std::endl);
+    }
     force_target_to_graph(graph, forced_target);
 
     // Configure all tensors
@@ -103,14 +109,23 @@
     auto it = _workloads.find(graph.id());
     ARM_COMPUTE_ERROR_ON_MSG(it == std::end(_workloads), "Graph is not registered!");
 
-    // Call input accessors
-    detail::call_all_input_node_accessors(it->second);
+    while(true)
+    {
+        // Call input accessors
+        if(!detail::call_all_input_node_accessors(it->second))
+        {
+            return;
+        }
 
-    // Run graph
-    detail::call_all_tasks(it->second);
+        // Run graph
+        detail::call_all_tasks(it->second);
 
-    // Call output accessors
-    detail::call_all_output_node_accessors(it->second);
+        // Call output accessors
+        if(!detail::call_all_output_node_accessors(it->second))
+        {
+            return;
+        }
+    }
 }
 
 void GraphManager::invalidate_graph(Graph &graph)