Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 1 | /* |
| 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 Pinitas | 6f669f0 | 2017-09-26 12:32:57 +0100 | [diff] [blame] | 28 | #include "arm_compute/core/SubTensorInfo.h" |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 29 | #include "arm_compute/core/TensorInfo.h" |
Georgios Pinitas | 7d3d1b9 | 2017-10-12 17:34:20 +0100 | [diff] [blame] | 30 | #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 Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 37 | |
| 38 | namespace arm_compute |
| 39 | { |
| 40 | namespace graph |
| 41 | { |
Georgios Pinitas | 6f669f0 | 2017-09-26 12:32:57 +0100 | [diff] [blame] | 42 | using arm_compute::ActivationLayerInfo; |
Georgios Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 43 | using arm_compute::Coordinates; |
| 44 | using arm_compute::DataType; |
| 45 | using arm_compute::DimensionRoundingType; |
| 46 | using arm_compute::ITensorInfo; |
Georgios Pinitas | 6f669f0 | 2017-09-26 12:32:57 +0100 | [diff] [blame] | 47 | using arm_compute::NormType; |
| 48 | using arm_compute::NormalizationLayerInfo; |
Georgios Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 49 | using arm_compute::PadStrideInfo; |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 50 | using arm_compute::PoolingLayerInfo; |
| 51 | using arm_compute::PoolingType; |
Georgios Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 52 | using arm_compute::SubTensorInfo; |
| 53 | using arm_compute::TensorInfo; |
| 54 | using arm_compute::TensorShape; |
| 55 | using arm_compute::WeightsInfo; |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 56 | |
Georgios Pinitas | 7d3d1b9 | 2017-10-12 17:34:20 +0100 | [diff] [blame] | 57 | using arm_compute::logging::LogLevel; |
Michalis Spyrou | 27c9efb | 2017-10-09 15:46:30 +0100 | [diff] [blame] | 58 | using arm_compute::ConvertPolicy; |
Georgios Pinitas | 7d3d1b9 | 2017-10-12 17:34:20 +0100 | [diff] [blame] | 59 | |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 60 | /**< Execution hint to the graph executor */ |
Georgios Pinitas | ff421f2 | 2017-10-04 16:53:58 +0100 | [diff] [blame] | 61 | enum class TargetHint |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 62 | { |
| 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 Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 68 | /** Convolution method hint to the graph executor */ |
Georgios Pinitas | 6f669f0 | 2017-09-26 12:32:57 +0100 | [diff] [blame] | 69 | enum class ConvolutionMethodHint |
| 70 | { |
| 71 | GEMM, /**< Convolution using GEMM */ |
| 72 | DIRECT /**< Direct convolution */ |
| 73 | }; |
Georgios Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 74 | |
Georgios Pinitas | 407c3e6 | 2017-10-25 18:26:46 +0100 | [diff] [blame] | 75 | /** Supported layer operations */ |
| 76 | enum class OperationType |
| 77 | { |
| 78 | ActivationLayer, |
| 79 | BatchNormalizationLayer, |
| 80 | ConvolutionLayer, |
Michalis Spyrou | 27c9efb | 2017-10-09 15:46:30 +0100 | [diff] [blame] | 81 | DepthConvertLayer, |
| 82 | DequantizationLayer, |
| 83 | FlattenLayer, |
Georgios Pinitas | 407c3e6 | 2017-10-25 18:26:46 +0100 | [diff] [blame] | 84 | FloorLayer, |
| 85 | FullyConnectedLayer, |
| 86 | L2NormalizeLayer, |
| 87 | NormalizationLayer, |
| 88 | PoolingLayer, |
Michalis Spyrou | 27c9efb | 2017-10-09 15:46:30 +0100 | [diff] [blame] | 89 | QuantizationLayer, |
| 90 | ReshapeLayer, |
Georgios Pinitas | 407c3e6 | 2017-10-25 18:26:46 +0100 | [diff] [blame] | 91 | SoftmaxLayer |
| 92 | }; |
| 93 | |
Georgios Pinitas | e2c82fe | 2017-10-02 18:51:47 +0100 | [diff] [blame] | 94 | /** Branch layer merging method */ |
| 95 | enum class BranchMergeMethod |
| 96 | { |
| 97 | DEPTH_CONCATENATE /**< Concatenate across depth */ |
| 98 | }; |
Anthony Barbier | 2a07e18 | 2017-08-04 18:20:27 +0100 | [diff] [blame] | 99 | } // namespace graph |
| 100 | } // namespace arm_compute |
| 101 | #endif /*__ARM_COMPUTE_GRAPH_TYPES_H__*/ |