COMPMID-1576: Add SliceLayer to graph API

Change-Id: I42260cc529ca7721e221d3d0576b1668e09f8307
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148255
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h
index eb37625..2dc3491 100644
--- a/arm_compute/graph/backends/ValidateHelpers.h
+++ b/arm_compute/graph/backends/ValidateHelpers.h
@@ -249,6 +249,30 @@
     return ReorgLayer::validate(input, output, node.stride());
 }
 
+/** Validates a Slice layer node
+ *
+ * @tparam SliceLayer Slice layer function type
+ *
+ * @param[in] node Node to validate
+ *
+ * @return Status
+ */
+template <typename SliceLayer>
+Status validate_slice_layer(SliceLayerNode &node)
+{
+    ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating Slice node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
+    ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 1);
+    ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1);
+
+    // Extract IO and info
+    arm_compute::ITensorInfo *input  = get_backing_tensor_info(node.input(0));
+    arm_compute::ITensorInfo *output = get_backing_tensor_info(node.output(0));
+    const Coordinates         starts = node.starts();
+    const Coordinates         ends   = node.ends();
+
+    return SliceLayer::validate(input, output, starts, ends);
+}
+
 /** Validates a YOLO layer node
  *
  * @tparam YOLOLayer YOLO layer type