COMPMID-793 : Add graph intermediate representation

Change-Id: Ic1685de4e19e0ac79669ef2da64e1dc96c7ea0bf
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115248
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h
index cc6f404..b4c3ad8 100644
--- a/utils/GraphUtils.h
+++ b/utils/GraphUtils.h
@@ -29,6 +29,10 @@
 #include "arm_compute/graph/ITensorAccessor.h"
 #include "arm_compute/graph/Types.h"
 
+#include "arm_compute/core/CL/OpenCL.h"
+
+#include "arm_compute/graph2/Types.h"
+
 #include <array>
 #include <random>
 #include <string>
@@ -308,6 +312,26 @@
         return arm_compute::support::cpp14::make_unique<TopNPredictionsAccessor>(labels_path, top_n, output_stream);
     }
 }
+
+/** Utility function to return the TargetHint
+ *
+ * @param[in] target Integer value which expresses the selected target. Must be 0 for NEON or 1 for OpenCL or 2 (OpenCL with Tuner)
+ *
+ * @return the TargetHint
+ */
+inline graph2::Target set_target_hint2(int target)
+{
+    ARM_COMPUTE_ERROR_ON_MSG(target > 2, "Invalid target. Target must be 0 (NEON) or 1 (OpenCL)");
+    if((target == 1 || target == 2) && arm_compute::opencl_is_available())
+    {
+        // If type of target is OpenCL, check if OpenCL is available and initialize the scheduler
+        return graph2::Target::CL;
+    }
+    else
+    {
+        return graph2::Target::NEON;
+    }
+}
 } // namespace graph_utils
 } // namespace arm_compute