From 7d3d1b923b7793f1cf5e29c78bfda2582522cf25 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 12 Oct 2017 17:34:20 +0100 Subject: COMPMID-619: Logging interface Change-Id: I73d1433ee7a682aeabb7540aa2ea1f6564f90aae Reviewed-on: http://mpd-gerrit.cambridge.arm.com/91775 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- src/graph/nodes/ActivationLayer.cpp | 17 +++++++++-------- src/graph/nodes/BatchNormalizationLayer.cpp | 13 ++++++------- src/graph/nodes/ConvolutionLayer.cpp | 23 +++++++++++------------ src/graph/nodes/FloorLayer.cpp | 13 ++++++------- src/graph/nodes/FullyConnectedLayer.cpp | 15 ++++++++------- src/graph/nodes/L2NormalizeLayer.cpp | 13 ++++++------- src/graph/nodes/NormalizationLayer.cpp | 13 +++++++------ src/graph/nodes/PoolingLayer.cpp | 11 ++++++----- src/graph/nodes/SoftmaxLayer.cpp | 11 ++++++----- 9 files changed, 65 insertions(+), 64 deletions(-) (limited to 'src/graph') diff --git a/src/graph/nodes/ActivationLayer.cpp b/src/graph/nodes/ActivationLayer.cpp index 5e75c28bc7..df73ba7078 100644 --- a/src/graph/nodes/ActivationLayer.cpp +++ b/src/graph/nodes/ActivationLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/ActivationLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLActivationLayer.h" #include "arm_compute/runtime/NEON/functions/NEActivationLayer.h" @@ -82,18 +81,20 @@ std::unique_ptr ActivationLayer::instantiate_node(GraphC if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out, _activation_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLActivationLayer"); } else { func = instantiate(in, out, _activation_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEActivationLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << " Activation function: " << _activation_info.activation() - << " a: " << _activation_info.a() - << " b: " << _activation_info.b() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << " Activation function: " << _activation_info.activation() + << " a: " << _activation_info.a() + << " b: " << _activation_info.b() + << std::endl); return func; } diff --git a/src/graph/nodes/BatchNormalizationLayer.cpp b/src/graph/nodes/BatchNormalizationLayer.cpp index 25e9e9bffb..db809f4ee4 100644 --- a/src/graph/nodes/BatchNormalizationLayer.cpp +++ b/src/graph/nodes/BatchNormalizationLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/BatchNormalizationLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h" #include "arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h" @@ -100,18 +99,18 @@ std::unique_ptr BatchNormalizationLayer::instantiate_nod if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out, _mean, _var, _beta, _gamma, _epsilon); - ARM_COMPUTE_LOG("Instantiating CLBatchNormalizationLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLBatchNormalizationLayer"); } else { func = instantiate(in, out, _mean, _var, _beta, _gamma, _epsilon); - ARM_COMPUTE_LOG("Instantiating NEBatchNormalizationLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEBatchNormalizationLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << std::endl); return func; } \ No newline at end of file diff --git a/src/graph/nodes/ConvolutionLayer.cpp b/src/graph/nodes/ConvolutionLayer.cpp index 303780ff35..07d42617e2 100644 --- a/src/graph/nodes/ConvolutionLayer.cpp +++ b/src/graph/nodes/ConvolutionLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/ConvolutionLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/functions/CLConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h" #include "arm_compute/runtime/IFunction.h" @@ -217,12 +216,12 @@ std::unique_ptr ConvolutionLayer::instantiate_node(Graph if(_num_groups == 1) { func = instantiate_convolution(in, out, conv_method_hint); - ARM_COMPUTE_LOG("Instantiating CLConvolutionLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLConvolutionLayer"); } else { func = instantiate_grouped_convolution(in, out, conv_method_hint); - ARM_COMPUTE_LOG("Instantiating NEConvolutionLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEConvolutionLayer"); } // Fill weights @@ -236,15 +235,15 @@ std::unique_ptr ConvolutionLayer::instantiate_node(Graph _biases.allocate_and_fill_if_needed(); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input Shape: " << in->info()->tensor_shape() - << " Weights shape: " << _weights.info().tensor_shape() - << " Biases Shape: " << _biases.info().tensor_shape() - << " Output Shape: " << out->info()->tensor_shape() - << " PadStrideInfo: " << _conv_info - << " Groups: " << _num_groups - << " WeightsInfo: " << _weights_info - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input Shape: " << in->info()->tensor_shape() + << " Weights shape: " << _weights.info().tensor_shape() + << " Biases Shape: " << _biases.info().tensor_shape() + << " Output Shape: " << out->info()->tensor_shape() + << " PadStrideInfo: " << _conv_info + << " Groups: " << _num_groups + << " WeightsInfo: " << _weights_info + << std::endl); return func; } diff --git a/src/graph/nodes/FloorLayer.cpp b/src/graph/nodes/FloorLayer.cpp index 3224799e3e..45e2c3ee41 100644 --- a/src/graph/nodes/FloorLayer.cpp +++ b/src/graph/nodes/FloorLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/FloorLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLFloor.h" #include "arm_compute/runtime/NEON/functions/NEFloor.h" @@ -76,18 +75,18 @@ std::unique_ptr FloorLayer::instantiate_node(GraphContex if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out); - ARM_COMPUTE_LOG("Instantiating CLFloorLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLFloorLayer"); } else { func = instantiate(in, out); - ARM_COMPUTE_LOG("Instantiating NEFloorLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEFloorLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << std::endl); return func; } diff --git a/src/graph/nodes/FullyConnectedLayer.cpp b/src/graph/nodes/FullyConnectedLayer.cpp index fa5ead8bdd..5f4807ad48 100644 --- a/src/graph/nodes/FullyConnectedLayer.cpp +++ b/src/graph/nodes/FullyConnectedLayer.cpp @@ -24,7 +24,6 @@ #include "arm_compute/graph/nodes/FullyConnectedLayer.h" #include "arm_compute/core/Helpers.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h" #include "arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h" #include "support/ToolchainSupport.h" @@ -123,18 +122,20 @@ std::unique_ptr FullyConnectedLayer::instantiate_node(Gr if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, _weights, _biases, out); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLFullyConnectedLayer"); } else { func = instantiate(in, _weights, _biases, out); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEFullyConnectedLayer"); } - ARM_COMPUTE_LOG(" Type: " << in->info()->data_type() - << " Input Shape: " << in->info()->tensor_shape() - << " Weights shape: " << _weights.info().tensor_shape() - << " Biases Shape: " << _biases.info().tensor_shape() - << " Output Shape: " << out->info()->tensor_shape() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Type: " << in->info()->data_type() + << " Input Shape: " << in->info()->tensor_shape() + << " Weights shape: " << _weights.info().tensor_shape() + << " Biases Shape: " << _biases.info().tensor_shape() + << " Output Shape: " << out->info()->tensor_shape() + << std::endl); return func; } diff --git a/src/graph/nodes/L2NormalizeLayer.cpp b/src/graph/nodes/L2NormalizeLayer.cpp index 7abc69c13a..c5689e159a 100644 --- a/src/graph/nodes/L2NormalizeLayer.cpp +++ b/src/graph/nodes/L2NormalizeLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/L2NormalizeLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLL2Normalize.h" #include "arm_compute/runtime/NEON/functions/NEL2Normalize.h" @@ -78,18 +77,18 @@ std::unique_ptr L2NormalizeLayer::instantiate_node(Graph if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out, _axis, _epsilon); - ARM_COMPUTE_LOG("Instantiating CLL2NormalizeLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLL2NormalizeLayer"); } else { func = instantiate(in, out, _axis, _epsilon); - ARM_COMPUTE_LOG("Instantiating NEL2NormalizeLayer"); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEL2NormalizeLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << std::endl); return func; } diff --git a/src/graph/nodes/NormalizationLayer.cpp b/src/graph/nodes/NormalizationLayer.cpp index 319a4252b6..680925a2b9 100644 --- a/src/graph/nodes/NormalizationLayer.cpp +++ b/src/graph/nodes/NormalizationLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/NormalizationLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLNormalizationLayer.h" #include "arm_compute/runtime/NEON/functions/NENormalizationLayer.h" @@ -82,17 +81,19 @@ std::unique_ptr NormalizationLayer::instantiate_node(Gra if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out, _norm_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLNormalizationLayer"); } else { func = instantiate(in, out, _norm_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NENormalizationLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << " Normalization info: " << _norm_info - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << " Normalization info: " << _norm_info + << std::endl); return func; } diff --git a/src/graph/nodes/PoolingLayer.cpp b/src/graph/nodes/PoolingLayer.cpp index 904ba18169..63579155cb 100644 --- a/src/graph/nodes/PoolingLayer.cpp +++ b/src/graph/nodes/PoolingLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/PoolingLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLPoolingLayer.h" #include "arm_compute/runtime/NEON/functions/NEPoolingLayer.h" @@ -82,16 +81,18 @@ std::unique_ptr PoolingLayer::instantiate_node(GraphCont if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out, _pool_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLPoolingLayer"); } else { func = instantiate(in, out, _pool_info); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NEPoolingLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << " Pooling info: " << _pool_info << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << " Pooling info: " << _pool_info << std::endl); return func; } diff --git a/src/graph/nodes/SoftmaxLayer.cpp b/src/graph/nodes/SoftmaxLayer.cpp index e3345f1400..3cdbc9c96a 100644 --- a/src/graph/nodes/SoftmaxLayer.cpp +++ b/src/graph/nodes/SoftmaxLayer.cpp @@ -23,7 +23,6 @@ */ #include "arm_compute/graph/nodes/SoftmaxLayer.h" -#include "arm_compute/core/Logger.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/CL/functions/CLSoftmaxLayer.h" #include "arm_compute/runtime/NEON/functions/NESoftmaxLayer.h" @@ -76,16 +75,18 @@ std::unique_ptr SoftmaxLayer::instantiate_node(GraphCont if(_target_hint == TargetHint::OPENCL) { func = instantiate(in, out); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating CLSoftmaxLayer"); } else { func = instantiate(in, out); + ARM_COMPUTE_LOG_GRAPH_INFO("Instantiating NESoftmaxLayer"); } - ARM_COMPUTE_LOG(" Data Type: " << in->info()->data_type() - << " Input shape: " << in->info()->tensor_shape() - << " Output shape: " << out->info()->tensor_shape() - << std::endl); + ARM_COMPUTE_LOG_GRAPH_INFO(" Data Type: " << in->info()->data_type() + << " Input shape: " << in->info()->tensor_shape() + << " Output shape: " << out->info()->tensor_shape() + << std::endl); return func; } -- cgit v1.2.1