arm_compute v19.05
diff --git a/src/graph/backends/CL/CLDeviceBackend.cpp b/src/graph/backends/CL/CLDeviceBackend.cpp
index ae7f0a5..0666ec0 100644
--- a/src/graph/backends/CL/CLDeviceBackend.cpp
+++ b/src/graph/backends/CL/CLDeviceBackend.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -81,6 +81,11 @@
_tuner.set_tune_new_kernels(enable_tuning);
}
+void CLDeviceBackend::set_kernel_tuning_mode(CLTunerMode tuning_mode)
+{
+ _tuner.set_tuner_mode(tuning_mode);
+}
+
void CLDeviceBackend::initialize_backend()
{
// Setup Scheduler
@@ -118,6 +123,7 @@
}
set_kernel_tuning(ctx.config().use_tuner);
+ set_kernel_tuning_mode(ctx.config().tuner_mode);
// Setup a management backend
if(ctx.memory_management_ctx(Target::CL) == nullptr)
diff --git a/src/graph/backends/CL/CLFunctionsFactory.cpp b/src/graph/backends/CL/CLFunctionsFactory.cpp
index b9e3ddc..90c1613 100644
--- a/src/graph/backends/CL/CLFunctionsFactory.cpp
+++ b/src/graph/backends/CL/CLFunctionsFactory.cpp
@@ -40,7 +40,8 @@
/** Target specific information structure used to pass information to the layer templates */
struct CLTargetInfo
{
- using TensorType = arm_compute::ICLTensor;
+ using TensorType = arm_compute::ICLTensor;
+ using TensorConcreteType = CLTensor;
static Target TargetType;
};
@@ -69,6 +70,14 @@
using Subtraction = CLArithmeticSubtraction;
using Multiplication = CLPixelWiseMultiplication;
};
+
+/** Function and tensor types to be used inside a CL fused convolution/batch normalization layer */
+struct CLFusedLayerTypes
+{
+ using ConvolutionLayer = CLConvolutionLayer;
+ using FuseBatchNormalization = CLFuseBatchNormalization;
+};
+
// TODO (isagot01): Remove once we support heterogeneous scheduling at function level
/** Wrapper for the CPP Function in the OpenCL backend **/
class CPPWrapperFunction : public IFunction
@@ -192,6 +201,8 @@
return detail::create_flatten_layer<CLFlattenLayer, CLTargetInfo>(*polymorphic_downcast<FlattenLayerNode *>(node));
case NodeType::FullyConnectedLayer:
return detail::create_fully_connected_layer<CLFullyConnectedLayer, CLTargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx);
+ case NodeType::FusedConvolutionBatchNormalizationLayer:
+ return detail::create_fused_convolution_batch_normalization_layer<CLFusedLayerTypes, CLTargetInfo>(*polymorphic_downcast<FusedConvolutionBatchNormalizationNode *>(node));
case NodeType::GenerateProposalsLayer:
return detail::create_generate_proposals_layer<CLGenerateProposalsLayer, CLTargetInfo>(*polymorphic_downcast<GenerateProposalsLayerNode *>(node), ctx);
case NodeType::NormalizationLayer:
@@ -218,6 +229,8 @@
return detail::create_slice_layer<CLSlice, CLTargetInfo>(*polymorphic_downcast<SliceLayerNode *>(node));
case NodeType::SoftmaxLayer:
return detail::create_softmax_layer<CLSoftmaxLayer, CLTargetInfo>(*polymorphic_downcast<SoftmaxLayerNode *>(node), ctx);
+ case NodeType::StackLayer:
+ return detail::create_stack_layer<CLStackLayer, CLTargetInfo>(*polymorphic_downcast<StackLayerNode *>(node));
case NodeType::UpsampleLayer:
return detail::create_upsample_layer<CLUpsampleLayer, CLTargetInfo>(*polymorphic_downcast<UpsampleLayerNode *>(node), ctx);
case NodeType::YOLOLayer:
diff --git a/src/graph/backends/CL/CLNodeValidator.cpp b/src/graph/backends/CL/CLNodeValidator.cpp
index 4b71837..cb8dc0a 100644
--- a/src/graph/backends/CL/CLNodeValidator.cpp
+++ b/src/graph/backends/CL/CLNodeValidator.cpp
@@ -74,6 +74,8 @@
return detail::validate_priorbox_layer<CLPriorBoxLayer>(*polymorphic_downcast<PriorBoxLayerNode *>(node));
case NodeType::ReorgLayer:
return detail::validate_reorg_layer<CLReorgLayer>(*polymorphic_downcast<ReorgLayerNode *>(node));
+ case NodeType::ReshapeLayer:
+ return detail::validate_reshape_layer<CLReshapeLayer>(*polymorphic_downcast<ReshapeLayerNode *>(node));
case NodeType::ROIAlignLayer:
return detail::validate_roi_align_layer<CLROIAlignLayer>(*polymorphic_downcast<ROIAlignLayerNode *>(node));
case NodeType::SliceLayer:
diff --git a/src/graph/backends/NEON/NEFunctionFactory.cpp b/src/graph/backends/NEON/NEFunctionFactory.cpp
index dc987dd..690a311 100644
--- a/src/graph/backends/NEON/NEFunctionFactory.cpp
+++ b/src/graph/backends/NEON/NEFunctionFactory.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -46,7 +46,8 @@
/** Target specific information structure used to pass information to the layer templates */
struct NETargetInfo
{
- using TensorType = arm_compute::ITensor;
+ using TensorType = arm_compute::ITensor;
+ using TensorConcreteType = arm_compute::Tensor;
static Target TargetType;
};
@@ -76,6 +77,13 @@
using Multiplication = NEPixelWiseMultiplication;
};
+/** Function and tensor types to be used inside a NEON fused convolution/batch normalization layer */
+struct NEFusedLayerTypes
+{
+ using ConvolutionLayer = NEConvolutionLayer;
+ using FuseBatchNormalization = NEFuseBatchNormalization;
+};
+
namespace detail
{
// Specialized functions
@@ -135,8 +143,10 @@
<< " Weights QuantInfo: " << weights->info()->quantization_info()
<< " Output QuantInfo: " << output->info()->quantization_info();
}
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << func_name
- << " Target " << NETargetInfo::TargetType
+ ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
+ << node.name()
+ << " Type: " << func_name
+ << " Target: " << NETargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
<< qss.str()
<< " Input shape: " << input->info()->tensor_shape()
@@ -210,6 +220,8 @@
return detail::create_flatten_layer<NEFlattenLayer, NETargetInfo>(*polymorphic_downcast<FlattenLayerNode *>(node));
case NodeType::FullyConnectedLayer:
return detail::create_fully_connected_layer<NEFullyConnectedLayer, NETargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx);
+ case NodeType::FusedConvolutionBatchNormalizationLayer:
+ return detail::create_fused_convolution_batch_normalization_layer<NEFusedLayerTypes, NETargetInfo>(*polymorphic_downcast<FusedConvolutionBatchNormalizationNode *>(node));
case NodeType::NormalizationLayer:
return detail::create_normalization_layer<NENormalizationLayer, NETargetInfo>(*polymorphic_downcast<NormalizationLayerNode *>(node), ctx);
case NodeType::PermuteLayer:
@@ -226,6 +238,8 @@
return detail::create_resize_layer<NEScale, NETargetInfo>(*polymorphic_downcast<ResizeLayerNode *>(node));
case NodeType::SoftmaxLayer:
return detail::create_softmax_layer<NESoftmaxLayer, NETargetInfo>(*polymorphic_downcast<SoftmaxLayerNode *>(node), ctx);
+ case NodeType::StackLayer:
+ return detail::create_stack_layer<NEStackLayer, NETargetInfo>(*polymorphic_downcast<StackLayerNode *>(node));
case NodeType::UpsampleLayer:
return detail::create_upsample_layer<NEUpsampleLayer, NETargetInfo>(*polymorphic_downcast<UpsampleLayerNode *>(node), ctx);
case NodeType::YOLOLayer:
diff --git a/src/graph/backends/NEON/NENodeValidator.cpp b/src/graph/backends/NEON/NENodeValidator.cpp
index b0feec5..77f2e7f 100644
--- a/src/graph/backends/NEON/NENodeValidator.cpp
+++ b/src/graph/backends/NEON/NENodeValidator.cpp
@@ -74,6 +74,8 @@
return detail::validate_priorbox_layer<NEPriorBoxLayer>(*polymorphic_downcast<PriorBoxLayerNode *>(node));
case NodeType::ReorgLayer:
return detail::validate_reorg_layer<NEReorgLayer>(*polymorphic_downcast<ReorgLayerNode *>(node));
+ case NodeType::ReshapeLayer:
+ return detail::validate_reshape_layer<NEReshapeLayer>(*polymorphic_downcast<ReshapeLayerNode *>(node));
case NodeType::ROIAlignLayer:
return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ROIAlignLayer");
case NodeType::SliceLayer: