aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/backends/ValidateHelpers.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-05-16 15:52:35 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:52:54 +0000
commit087eaf67dc4be4234a7fcfc3b109c1e4f5e7dd5e (patch)
tree5cb63112eb567bbc683dfb9a0f51ce4960cf800d /arm_compute/graph/backends/ValidateHelpers.h
parent1b993389a3ac0cd1b0edc0b11e92fbdee127576f (diff)
downloadComputeLibrary-087eaf67dc4be4234a7fcfc3b109c1e4f5e7dd5e.tar.gz
COMPMID-1176: Adds nodes to the graph.
Nodes added: -ChannelShuffle -Resize -Deconvolution -Dummy (used for performance analysis and debugging) Change-Id: Iad19960cbbce6e25532f77bfd34b2292c0ca9781 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/131672 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/graph/backends/ValidateHelpers.h')
-rw-r--r--arm_compute/graph/backends/ValidateHelpers.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h
index db3f8ba4f9..189fbdc9c7 100644
--- a/arm_compute/graph/backends/ValidateHelpers.h
+++ b/arm_compute/graph/backends/ValidateHelpers.h
@@ -52,6 +52,29 @@ inline arm_compute::ITensorInfo *get_backing_tensor_info(arm_compute::graph::Ten
return ((tensor == nullptr) || (tensor->handle() == nullptr)) ? nullptr : tensor->handle()->tensor().info();
}
+/** Validates a Channel Shuffle layer node
+ *
+ * @tparam ChannelShuffleLayer Channel Shuffle layer function type
+ *
+ * @param[in] node Node to validate
+ *
+ * @return Status
+ */
+template <typename ChannelShuffleLayer>
+Status validate_channel_shuffle_layer(ChannelShuffleLayerNode &node)
+{
+ ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ChannelShuffle 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 unsigned int num_groups = node.num_groups();
+
+ return ChannelShuffleLayer::validate(input, output, num_groups);
+}
+
/** Validates a Convolution layer node
*
* @tparam ConvolutionLayer Default Convolution layer function type