Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 ARM Limited. |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 24 | #include "arm_compute/graph/backends/NEON/NEFunctionFactory.h" |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 25 | |
| 26 | #include "arm_compute/core/utils/misc/Cast.h" |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 27 | #include "arm_compute/graph/Graph.h" |
| 28 | #include "arm_compute/graph/GraphContext.h" |
| 29 | #include "arm_compute/graph/Logger.h" |
| 30 | #include "arm_compute/graph/TypePrinter.h" |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 31 | #include "arm_compute/graph/backends/FunctionHelpers.h" |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 32 | #include "arm_compute/graph/backends/Utils.h" |
| 33 | #include "arm_compute/graph/nodes/Nodes.h" |
Isabella Gottardi | 7234ed8 | 2018-11-27 08:51:10 +0000 | [diff] [blame] | 34 | #include "arm_compute/runtime/CPP/CPPFunctions.h" |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 35 | #include "arm_compute/runtime/NEON/NEFunctions.h" |
| 36 | #include "support/ToolchainSupport.h" |
| 37 | |
| 38 | using namespace arm_compute::utils::cast; |
| 39 | |
| 40 | namespace arm_compute |
| 41 | { |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 42 | namespace graph |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 43 | { |
| 44 | namespace backends |
| 45 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 46 | /** Target specific information structure used to pass information to the layer templates */ |
| 47 | struct NETargetInfo |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 48 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 49 | using TensorType = arm_compute::ITensor; |
| 50 | static Target TargetType; |
| 51 | }; |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 52 | |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 53 | Target NETargetInfo::TargetType = Target::NEON; |
| 54 | |
| 55 | /** Collection of CL convolution functions */ |
| 56 | struct NEConvolutionLayerFunctions |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 57 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 58 | using GenericConvolutionLayer = NEConvolutionLayer; |
| 59 | using GEMMConvolutionLayer = NEGEMMConvolutionLayer; |
| 60 | using DirectConvolutionLayer = NEDirectConvolutionLayer; |
| 61 | using WinogradConvolutionLayer = NEWinogradConvolutionLayer; |
| 62 | }; |
| 63 | |
| 64 | /** Collection of CL depthwise convolution functions */ |
| 65 | struct NEDepthwiseConvolutionLayerFunctions |
| 66 | { |
| 67 | using GenericDepthwiseConvolutionLayer = NEDepthwiseConvolutionLayer; |
| 68 | using DepthwiseConvolutionLayer3x3 = NEDepthwiseConvolutionLayer3x3; |
| 69 | }; |
| 70 | |
| 71 | /** Collection of CL element-wise functions */ |
| 72 | struct NEEltwiseFunctions |
| 73 | { |
| 74 | using Addition = NEArithmeticAddition; |
| 75 | using Subtraction = NEArithmeticSubtraction; |
| 76 | using Multiplication = NEPixelWiseMultiplication; |
| 77 | }; |
| 78 | |
| 79 | namespace detail |
| 80 | { |
Isabella Gottardi | 7234ed8 | 2018-11-27 08:51:10 +0000 | [diff] [blame] | 81 | // Specialized functions |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 82 | template <> |
| 83 | std::unique_ptr<IFunction> create_convolution_layer<NEConvolutionLayerFunctions, NETargetInfo>(ConvolutionLayerNode &node, |
| 84 | GraphContext &ctx) |
| 85 | { |
| 86 | validate_node<NETargetInfo>(node, 3 /* expected inputs */, 1 /* expected outputs */); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 87 | |
| 88 | // Extract IO and info |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 89 | NETargetInfo::TensorType *input = get_backing_tensor<NETargetInfo>(node.input(0)); |
| 90 | NETargetInfo::TensorType *weights = get_backing_tensor<NETargetInfo>(node.input(1)); |
| 91 | NETargetInfo::TensorType *biases = get_backing_tensor<NETargetInfo>(node.input(2)); |
| 92 | NETargetInfo::TensorType *output = get_backing_tensor<NETargetInfo>(node.output(0)); |
Giorgio Arena | bb54e4e | 2018-04-05 17:20:34 +0100 | [diff] [blame] | 93 | |
Georgios Pinitas | fd7e853 | 2018-09-07 10:51:27 +0100 | [diff] [blame] | 94 | const bool is_quantized = is_data_type_quantized_asymmetric(input->info()->data_type()); |
| 95 | |
| 96 | if(is_quantized) |
Giorgio Arena | bb54e4e | 2018-04-05 17:20:34 +0100 | [diff] [blame] | 97 | { |
| 98 | biases->info()->set_data_type(DataType::S32); |
| 99 | } |
| 100 | |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 101 | const PadStrideInfo conv_info = node.convolution_info(); |
| 102 | const ConvolutionMethod conv_algorithm = node.convolution_method(); |
| 103 | const ActivationLayerInfo fused_act = node.fused_activation(); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 104 | |
| 105 | // Create and configure function (we assume that functions have been validated before creation) |
| 106 | std::shared_ptr<IMemoryManager> mm = get_memory_manager(ctx, Target::NEON); |
| 107 | std::unique_ptr<IFunction> func; |
| 108 | std::string func_name; |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 109 | if(conv_algorithm == ConvolutionMethod::Direct) |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 110 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 111 | std::tie(func, func_name) = create_named_memory_managed_function<NEDirectConvolutionLayer>( |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 112 | std::string("DirectConvolutionLayer"), mm, input, weights, biases, output, conv_info, fused_act); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 113 | } |
| 114 | else if(conv_algorithm == ConvolutionMethod::GEMM) |
| 115 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 116 | std::tie(func, func_name) = create_named_memory_managed_function<NEGEMMConvolutionLayer>( |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 117 | std::string("GEMMConvolutionLayer"), mm, input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1, 1), fused_act); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 118 | } |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 119 | else if(conv_algorithm == ConvolutionMethod::Winograd) |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 120 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 121 | std::tie(func, func_name) = create_named_memory_managed_function<NEWinogradConvolutionLayer>( |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 122 | std::string("WinogradConvolutionLayer"), mm, input, weights, biases, output, conv_info, fused_act); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 123 | } |
| 124 | else |
| 125 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 126 | std::tie(func, func_name) = create_named_memory_managed_function<NEConvolutionLayer>( |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 127 | std::string("ConvolutionLayer"), mm, input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1, 1), fused_act); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | // Log info |
Georgios Pinitas | fd7e853 | 2018-09-07 10:51:27 +0100 | [diff] [blame] | 131 | std::ostringstream qss; |
| 132 | if(is_quantized) |
| 133 | { |
| 134 | qss << " Input QuantInfo: " << input->info()->quantization_info() |
| 135 | << " Weights QuantInfo: " << weights->info()->quantization_info() |
| 136 | << " Output QuantInfo: " << output->info()->quantization_info(); |
| 137 | } |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 138 | ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << func_name |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 139 | << " Target " << NETargetInfo::TargetType |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 140 | << " Data Type: " << input->info()->data_type() |
Georgios Pinitas | fd7e853 | 2018-09-07 10:51:27 +0100 | [diff] [blame] | 141 | << qss.str() |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 142 | << " Input shape: " << input->info()->tensor_shape() |
| 143 | << " Weights shape: " << weights->info()->tensor_shape() |
| 144 | << " Output shape: " << output->info()->tensor_shape() |
Georgios Pinitas | 08346e9 | 2018-10-16 19:10:46 +0100 | [diff] [blame] | 145 | << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "") |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 146 | << std::endl); |
| 147 | return func; |
| 148 | } |
| 149 | |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 150 | template <> |
| 151 | std::unique_ptr<IFunction> create_normalization_layer<NENormalizationLayer, NETargetInfo>(NormalizationLayerNode &node, GraphContext &ctx) |
Georgios Pinitas | 087eaf6 | 2018-05-16 15:52:35 +0100 | [diff] [blame] | 152 | { |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 153 | validate_node<NETargetInfo>(node, 1 /* expected inputs */, 1 /* expected outputs */); |
Georgios Pinitas | 087eaf6 | 2018-05-16 15:52:35 +0100 | [diff] [blame] | 154 | |
| 155 | // Extract IO and info |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 156 | NETargetInfo::TensorType *input = get_backing_tensor<NETargetInfo>(node.input(0)); |
| 157 | NETargetInfo::TensorType *output = get_backing_tensor<NETargetInfo>(node.output(0)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 158 | const NormalizationLayerInfo norm_info = node.normalization_info(); |
| 159 | ARM_COMPUTE_ERROR_ON(input == nullptr); |
| 160 | ARM_COMPUTE_ERROR_ON(output == nullptr); |
| 161 | |
| 162 | // Create and configure function |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 163 | auto func = support::cpp14::make_unique<NENormalizationLayer>(get_memory_manager(ctx, NETargetInfo::TargetType)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 164 | func->configure(input, output, norm_info); |
| 165 | |
| 166 | // Log info |
Pablo Tello | 3252143 | 2018-11-15 14:43:10 +0000 | [diff] [blame] | 167 | ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " |
| 168 | << node.name() |
| 169 | << " Type: " << node.type() |
| 170 | << " Target: " << NETargetInfo::TargetType |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 171 | << " Data Type: " << input->info()->data_type() |
| 172 | << " Input shape: " << input->info()->tensor_shape() |
| 173 | << " Output shape: " << output->info()->tensor_shape() |
| 174 | << " Normalization info: " << norm_info.type() |
| 175 | << std::endl); |
| 176 | |
| 177 | return std::move(func); |
| 178 | } |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 179 | } // namespace detail |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 180 | |
| 181 | std::unique_ptr<IFunction> NEFunctionFactory::create(INode *node, GraphContext &ctx) |
| 182 | { |
| 183 | if(node == nullptr) |
| 184 | { |
| 185 | return nullptr; |
| 186 | } |
| 187 | |
| 188 | NodeType type = node->type(); |
| 189 | switch(type) |
| 190 | { |
| 191 | case NodeType::ActivationLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 192 | return detail::create_activation_layer<NEActivationLayer, NETargetInfo>(*polymorphic_downcast<ActivationLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 193 | case NodeType::BatchNormalizationLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 194 | return detail::create_batch_normalization_layer<NEBatchNormalizationLayer, NETargetInfo>(*polymorphic_downcast<BatchNormalizationLayerNode *>(node)); |
Georgios Pinitas | f1adf11 | 2018-11-02 12:54:18 +0000 | [diff] [blame] | 195 | case NodeType::ChannelShuffleLayer: |
| 196 | return detail::create_channel_shuffle_layer<NEChannelShuffleLayer, NETargetInfo>(*polymorphic_downcast<ChannelShuffleLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 197 | case NodeType::ConvolutionLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 198 | return detail::create_convolution_layer<NEConvolutionLayerFunctions, NETargetInfo>(*polymorphic_downcast<ConvolutionLayerNode *>(node), ctx); |
Georgios Pinitas | 087eaf6 | 2018-05-16 15:52:35 +0100 | [diff] [blame] | 199 | case NodeType::DeconvolutionLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 200 | return detail::create_deconvolution_layer<NEDeconvolutionLayer, NETargetInfo>(*polymorphic_downcast<DeconvolutionLayerNode *>(node), ctx); |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 201 | case NodeType::ConcatenateLayer: |
| 202 | return detail::create_concatenate_layer<NEConcatenateLayer, NETargetInfo>(*polymorphic_downcast<ConcatenateLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 203 | case NodeType::DepthwiseConvolutionLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 204 | return detail::create_depthwise_convolution_layer<NEDepthwiseConvolutionLayerFunctions, NETargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); |
Isabella Gottardi | 7234ed8 | 2018-11-27 08:51:10 +0000 | [diff] [blame] | 205 | case NodeType::DetectionOutputLayer: |
| 206 | return detail::create_detection_output_layer<CPPDetectionOutputLayer, NETargetInfo>(*polymorphic_downcast<DetectionOutputLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 207 | case NodeType::EltwiseLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 208 | return detail::create_eltwise_layer<NEEltwiseFunctions, NETargetInfo>(*polymorphic_downcast<EltwiseLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 209 | case NodeType::FlattenLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 210 | return detail::create_flatten_layer<NEFlattenLayer, NETargetInfo>(*polymorphic_downcast<FlattenLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 211 | case NodeType::FullyConnectedLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 212 | return detail::create_fully_connected_layer<NEFullyConnectedLayer, NETargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 213 | case NodeType::NormalizationLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 214 | return detail::create_normalization_layer<NENormalizationLayer, NETargetInfo>(*polymorphic_downcast<NormalizationLayerNode *>(node), ctx); |
Georgios Pinitas | 57c4824 | 2018-08-02 13:41:49 +0100 | [diff] [blame] | 215 | case NodeType::PermuteLayer: |
| 216 | return detail::create_permute_layer<NEPermute, NETargetInfo>(*polymorphic_downcast<PermuteLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 217 | case NodeType::PoolingLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 218 | return detail::create_pooling_layer<NEPoolingLayer, NETargetInfo>(*polymorphic_downcast<PoolingLayerNode *>(node)); |
Pablo Tello | 3252143 | 2018-11-15 14:43:10 +0000 | [diff] [blame] | 219 | case NodeType::PriorBoxLayer: |
| 220 | return detail::create_priorbox_layer<NEPriorBoxLayer, NETargetInfo>(*polymorphic_downcast<PriorBoxLayerNode *>(node)); |
Gian Marco Iodice | 23e2479 | 2018-09-07 15:32:14 +0100 | [diff] [blame] | 221 | case NodeType::ReorgLayer: |
| 222 | return detail::create_reorg_layer<NEReorgLayer, NETargetInfo>(*polymorphic_downcast<ReorgLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 223 | case NodeType::ReshapeLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 224 | return detail::create_reshape_layer<NEReshapeLayer, NETargetInfo>(*polymorphic_downcast<ReshapeLayerNode *>(node)); |
Georgios Pinitas | 087eaf6 | 2018-05-16 15:52:35 +0100 | [diff] [blame] | 225 | case NodeType::ResizeLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 226 | return detail::create_resize_layer<NEScale, NETargetInfo>(*polymorphic_downcast<ResizeLayerNode *>(node)); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 227 | case NodeType::SoftmaxLayer: |
Georgios Pinitas | da2491f | 2018-06-01 17:49:09 +0100 | [diff] [blame] | 228 | return detail::create_softmax_layer<NESoftmaxLayer, NETargetInfo>(*polymorphic_downcast<SoftmaxLayerNode *>(node), ctx); |
Michalis Spyrou | 7c9541c | 2018-09-20 17:40:04 +0100 | [diff] [blame] | 229 | case NodeType::UpsampleLayer: |
| 230 | return detail::create_upsample_layer<NEUpsampleLayer, NETargetInfo>(*polymorphic_downcast<UpsampleLayerNode *>(node), ctx); |
Michalis Spyrou | e22aa13 | 2018-09-13 10:35:33 +0100 | [diff] [blame] | 231 | case NodeType::YOLOLayer: |
| 232 | return detail::create_yolo_layer<NEYOLOLayer, NETargetInfo>(*polymorphic_downcast<YOLOLayerNode *>(node), ctx); |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 233 | default: |
| 234 | return nullptr; |
| 235 | } |
| 236 | } |
| 237 | } // namespace backends |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 238 | } // namespace graph |
Pablo Tello | 3252143 | 2018-11-15 14:43:10 +0000 | [diff] [blame] | 239 | } // namespace arm_compute |