Add multiple output support for dynamic fusion

* The dependency graph now can schedule any acyclic graph into
  a sequential list of operators. This is needed as the output
  operators now form branches in the graph.
* Fix the definition of input, output and intermediate tensors
  in GpuKernelComponentGroup to support non-linear but sequential
  list of operators.
* Add constraint on GpuOperatorGroup to enforce strictly linear
  fusion style, but allow output operator as the only form of
  branch.

Resolves: COMPMID-5771
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I68de3a31a2456145081f0a397e4e61dd66327682
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8823
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateWriter.cpp b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateWriter.cpp
index 0afd0e7..eed481f 100644
--- a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateWriter.cpp
+++ b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateWriter.cpp
@@ -203,9 +203,7 @@
 }
 std::string ClTemplateWriter::write_global_section() const
 {
-    const auto dst_tensors = _components.get_dst_tensors();
-    ARM_COMPUTE_ERROR_ON_MSG(dst_tensors.size() != 1, "Only one destination tensor per kernel is allowed");
-    const auto dst_info   = dst_tensors[0];
+    const auto dst_info   = _components.get_any_dst_tensor();
     const auto dst_w      = dst_info->dimension(0);
     const auto tile_w     = std::max(1, get_window().x().step());
     const auto tile_h     = std::max(1, get_window().y().step());