blob: b3aa034477a2f66b9faa5be05c8f685085589665 [file] [log] [blame]
Anthony Barbier2a07e182017-08-04 18:20:27 +01001/*
2 * Copyright (c) 2017 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 */
24#ifndef __ARM_COMPUTE_GRAPH_TYPES_H__
25#define __ARM_COMPUTE_GRAPH_TYPES_H__
26
27#include "arm_compute/core/ITensor.h"
Georgios Pinitas6f669f02017-09-26 12:32:57 +010028#include "arm_compute/core/SubTensorInfo.h"
Anthony Barbier2a07e182017-08-04 18:20:27 +010029#include "arm_compute/core/TensorInfo.h"
Georgios Pinitas7d3d1b92017-10-12 17:34:20 +010030#include "arm_compute/core/utils/logging/Macros.h"
31
32#define ARM_COMPUTE_LOG_GRAPH(log_level, x) \
33 ARM_COMPUTE_LOG_STREAM("GRAPH", log_level, x)
34
35#define ARM_COMPUTE_LOG_GRAPH_INFO(x) \
36 ARM_COMPUTE_LOG_STREAM("GRAPH", arm_compute::logging::LogLevel::INFO, x)
Anthony Barbier2a07e182017-08-04 18:20:27 +010037
38namespace arm_compute
39{
40namespace graph
41{
Georgios Pinitas6f669f02017-09-26 12:32:57 +010042using arm_compute::ActivationLayerInfo;
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010043using arm_compute::Coordinates;
44using arm_compute::DataType;
45using arm_compute::DimensionRoundingType;
46using arm_compute::ITensorInfo;
Georgios Pinitas6f669f02017-09-26 12:32:57 +010047using arm_compute::NormType;
48using arm_compute::NormalizationLayerInfo;
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010049using arm_compute::PadStrideInfo;
Anthony Barbier2a07e182017-08-04 18:20:27 +010050using arm_compute::PoolingLayerInfo;
51using arm_compute::PoolingType;
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010052using arm_compute::SubTensorInfo;
53using arm_compute::TensorInfo;
54using arm_compute::TensorShape;
55using arm_compute::WeightsInfo;
Anthony Barbier2a07e182017-08-04 18:20:27 +010056
Georgios Pinitas7d3d1b92017-10-12 17:34:20 +010057using arm_compute::logging::LogLevel;
Michalis Spyrou27c9efb2017-10-09 15:46:30 +010058using arm_compute::ConvertPolicy;
Georgios Pinitas7d3d1b92017-10-12 17:34:20 +010059
Anthony Barbier2a07e182017-08-04 18:20:27 +010060/**< Execution hint to the graph executor */
Georgios Pinitasff421f22017-10-04 16:53:58 +010061enum class TargetHint
Anthony Barbier2a07e182017-08-04 18:20:27 +010062{
63 DONT_CARE, /**< Run node in any device */
64 OPENCL, /**< Run node on an OpenCL capable device (GPU) */
65 NEON /**< Run node on a NEON capable device */
66};
67
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010068/** Convolution method hint to the graph executor */
Georgios Pinitas6f669f02017-09-26 12:32:57 +010069enum class ConvolutionMethodHint
70{
71 GEMM, /**< Convolution using GEMM */
72 DIRECT /**< Direct convolution */
73};
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010074
Georgios Pinitas407c3e62017-10-25 18:26:46 +010075/** Supported layer operations */
76enum class OperationType
77{
78 ActivationLayer,
79 BatchNormalizationLayer,
80 ConvolutionLayer,
Michalis Spyrou27c9efb2017-10-09 15:46:30 +010081 DepthConvertLayer,
82 DequantizationLayer,
83 FlattenLayer,
Georgios Pinitas407c3e62017-10-25 18:26:46 +010084 FloorLayer,
85 FullyConnectedLayer,
86 L2NormalizeLayer,
87 NormalizationLayer,
88 PoolingLayer,
Michalis Spyrou27c9efb2017-10-09 15:46:30 +010089 QuantizationLayer,
90 ReshapeLayer,
Georgios Pinitas407c3e62017-10-25 18:26:46 +010091 SoftmaxLayer
92};
93
Georgios Pinitase2c82fe2017-10-02 18:51:47 +010094/** Branch layer merging method */
95enum class BranchMergeMethod
96{
97 DEPTH_CONCATENATE /**< Concatenate across depth */
98};
Anthony Barbier2a07e182017-08-04 18:20:27 +010099} // namespace graph
100} // namespace arm_compute
101#endif /*__ARM_COMPUTE_GRAPH_TYPES_H__*/