From 6e9d0e048b48712f4f72d4b0a5b94a277391a357 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Fri, 3 Jan 2020 15:02:04 +0000 Subject: COMPMID-2856 Add PrintLayer at graph level Signed-off-by: Giorgio Arena Change-Id: I8f02bb67adae8cc7d884f2417cc9c408985f0d5a Reviewed-on: https://review.mlplatform.org/c/2546 Reviewed-by: Manuel Bottini Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- arm_compute/graph/backends/FunctionHelpers.h | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'arm_compute/graph/backends/FunctionHelpers.h') diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h index a02e323b8d..bf0250c623 100644 --- a/arm_compute/graph/backends/FunctionHelpers.h +++ b/arm_compute/graph/backends/FunctionHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -1149,6 +1149,35 @@ std::unique_ptr create_pooling_layer(PoolingLayerNode &node) return std::move(func); } +/** Create a backend print layer function + * + * @tparam TargetInfo Target-specific information + * + * @param[in] node Node to create the backend function for + * + * @return Backend print layer function + */ +template +std::unique_ptr create_print_layer(PrintLayerNode &node) +{ + validate_node(node, 1 /* expected inputs */, 1 /* expected outputs */); + + typename TargetInfo::TensorType *input = get_backing_tensor(node.input(0)); + ARM_COMPUTE_ERROR_ON(input == nullptr); + ARM_COMPUTE_UNUSED(input); + + // Log info + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " + << node.name() + << " Type: " << node.type() + << " Target: " << TargetInfo::TargetType + << " Data Type: " << input->info()->data_type() + << " Input shape: " << input->info()->tensor_shape() + << std::endl); + + return nullptr; +} + /** Create a backend priorbox layer function * * @tparam PriorBoxLayerFunction Backend priorbox function -- cgit v1.2.1