diff options
Diffstat (limited to 'arm_compute/graph/Types.h')
-rw-r--r-- | arm_compute/graph/Types.h | 71 |
1 files changed, 48 insertions, 23 deletions
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h index 296f757c9b..5541e3cbcc 100644 --- a/arm_compute/graph/Types.h +++ b/arm_compute/graph/Types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 ARM Limited. + * Copyright (c) 2018-2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,13 +21,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_GRAPH_TYPES_H -#define ARM_COMPUTE_GRAPH_TYPES_H +#ifndef ACL_ARM_COMPUTE_GRAPH_TYPES_H +#define ACL_ARM_COMPUTE_GRAPH_TYPES_H #include "arm_compute/core/Error.h" #include "arm_compute/core/PixelValue.h" #include "arm_compute/core/Types.h" +#include "arm_compute/function_info/ActivationLayerInfo.h" +#include "arm_compute/function_info/ConvolutionInfo.h" +#include "arm_compute/function_info/FullyConnectedLayerInfo.h" +#include "arm_compute/function_info/GEMMInfo.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" +#include "arm_compute/runtime/CL/CLTypes.h" #include <limits> #include <string> @@ -36,30 +41,31 @@ namespace arm_compute { namespace graph { +using arm_compute::CLBackendType; using arm_compute::CLTunerMode; using arm_compute::Status; using arm_compute::Coordinates; -using arm_compute::DataType; using arm_compute::DataLayout; using arm_compute::DataLayoutDimension; -using arm_compute::TensorShape; -using arm_compute::Size2D; +using arm_compute::DataType; using arm_compute::PermutationVector; using arm_compute::PixelValue; +using arm_compute::Size2D; +using arm_compute::TensorShape; using arm_compute::ActivationLayerInfo; using arm_compute::DetectionOutputLayerInfo; using arm_compute::DetectionPostProcessLayerInfo; -using arm_compute::NormType; -using arm_compute::NormalizationLayerInfo; +using arm_compute::DimensionRoundingType; using arm_compute::FullyConnectedLayerInfo; +using arm_compute::InterpolationPolicy; +using arm_compute::NormalizationLayerInfo; +using arm_compute::NormType; using arm_compute::PadStrideInfo; using arm_compute::PoolingLayerInfo; using arm_compute::PoolingType; using arm_compute::PriorBoxLayerInfo; -using arm_compute::DimensionRoundingType; -using arm_compute::InterpolationPolicy; using GraphID = unsigned int; using TensorID = unsigned int; @@ -76,26 +82,31 @@ constexpr EdgeID EmptyEdgeID = std::numeric_limits<EdgeID>::max(); // Forward declarations struct TensorDescriptor; + /** Graph configuration structure */ struct GraphConfig { - bool use_function_memory_manager{ true }; /**< Use a memory manager to manage per-funcion auxilary memory */ - bool use_function_weights_manager{ true }; /**< Use a weights manager to manage transformed weights */ - bool use_transition_memory_manager{ true }; /**< Use a memory manager to manager transition buffer memory */ - bool use_tuner{ false }; /**< Use a tuner in tunable backends */ - bool convert_to_uint8{ false }; /**< Convert graph to a synthetic uint8 graph */ - CLTunerMode tuner_mode{ CLTunerMode::EXHAUSTIVE }; /**< Tuner mode to be used by the CL tuner */ - int num_threads{ -1 }; /**< Number of threads to use (thread capable backends), if 0 the backend will auto-initialize, if -1 the backend will stay as it is. */ - std::string tuner_file{ "acl_tuner.csv" }; /**< File to load/store tuning values from */ + bool use_function_memory_manager{true}; /**< Use a memory manager to manage per-function auxilary memory */ + bool use_function_weights_manager{true}; /**< Use a weights manager to manage transformed weights */ + bool use_transition_memory_manager{true}; /**< Use a memory manager to manager transition buffer memory */ + bool use_tuner{false}; /**< Use a tuner in tunable backends */ + bool use_synthetic_type{false}; /**< Convert graph to a synthetic graph for a data type */ + DataType synthetic_type{DataType::QASYMM8}; /**< The data type of the synthetic graph */ + CLTunerMode tuner_mode{CLTunerMode::EXHAUSTIVE}; /**< Tuner mode to be used by the CL tuner */ + int num_threads{ + -1}; /**< Number of threads to use (thread capable backends), if 0 the backend will auto-initialize, if -1 the backend will stay as it is. */ + std::string tuner_file{"acl_tuner.csv"}; /**< File to load/store tuning values from */ + std::string mlgo_file{"heuristics.mlgo"}; /**< Filename to load MLGO heuristics from */ + CLBackendType backend_type{CLBackendType::Native}; /**< CL backend type to use */ }; /**< Device target types */ enum class Target { UNSPECIFIED, /**< Unspecified Target */ - NEON, /**< NEON capable target device */ + NEON, /**< Arm® Neon™ capable target device */ CL, /**< OpenCL capable target device */ - GC, /**< GLES compute capable target device */ + CLVK, /**< CLVK capable target device */ }; /** Supported Element-wise operations */ @@ -103,7 +114,16 @@ enum class EltwiseOperation { Add, /**< Arithmetic addition */ Sub, /**< Arithmetic subtraction */ - Mul /**< Arithmetic multiplication */ + Mul, /**< Arithmetic multiplication */ + Max, /**< Arithmetic maximum */ + Div, /**< Arithmetic division */ + Min, /**< Arithmetic minimum */ +}; + +/** Supported Unary Element-wise operations */ +enum class UnaryEltwiseOperation +{ + Exp /**< Exp */ }; /** Supported Convolution layer methods */ @@ -134,12 +154,14 @@ enum class FastMathHint enum class NodeType { ActivationLayer, + ArgMinMaxLayer, BatchNormalizationLayer, BoundingBoxTransformLayer, ChannelShuffleLayer, ConcatenateLayer, ConvolutionLayer, DeconvolutionLayer, + DepthToSpaceLayer, DepthwiseConvolutionLayer, DequantizationLayer, DetectionOutputLayer, @@ -150,6 +172,7 @@ enum class NodeType FusedConvolutionBatchNormalizationLayer, FusedDepthwiseConvolutionBatchNormalizationLayer, GenerateProposalsLayer, + L2NormalizeLayer, NormalizationLayer, NormalizePlanarYUVLayer, PadLayer, @@ -159,6 +182,7 @@ enum class NodeType PrintLayer, PriorBoxLayer, QuantizationLayer, + ReductionOperationLayer, ReorgLayer, ReshapeLayer, ResizeLayer, @@ -167,8 +191,9 @@ enum class NodeType SliceLayer, SplitLayer, StackLayer, + StridedSliceLayer, UpsampleLayer, - YOLOLayer, + UnaryEltwiseLayer, Input, Output, @@ -202,4 +227,4 @@ struct NodeParams }; } // namespace graph } // namespace arm_compute -#endif /* ARM_COMPUTE_GRAPH_TYPES_H */ +#endif // ACL_ARM_COMPUTE_GRAPH_TYPES_H |