From 552e11dbfa03c5f3a86911c2941e545294be94ac Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 23 Sep 2020 15:08:38 +0100 Subject: COMPMID-3761: Update directory structure Change-Id: Ic450f731216d1aa7f8975aecdc07e98cccc05b99 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4023 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Reviewed-by: SiCong Li --- docs/00_introduction.dox | 153 +------------------- docs/ComputeLibrary.dir | 364 +++++++++++++++++++++++++++++++++++++++++++++++ docs/Doxyfile | 7 +- utils/Utils.h | 4 + 4 files changed, 375 insertions(+), 153 deletions(-) create mode 100644 docs/ComputeLibrary.dir diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox index 97d5ffec70..21012e6d99 100644 --- a/docs/00_introduction.dox +++ b/docs/00_introduction.dox @@ -69,158 +69,7 @@ This archive contains: - A @ref utils folder containing headers with some boiler plate code used by the examples. - This documentation. -You should have the following file organisation: - - . - ├── arm_compute --> All the arm_compute headers - │ ├── graph.h --> Includes all the Graph headers at once. - │   ├── core - │   │   ├── CL - │   │   │   ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context. - │   │   │   ├── CLKernels.h --> Includes all the OpenCL kernels at once - │   │   │   ├── CL specialisation of all the generic interfaces (ICLTensor, ICLArray, etc.) - │   │   │   ├── gemm --> Folder containing all the configuration files for GEMM - │   │   │   ├── kernels --> Folder containing all the OpenCL kernels - │   │   │   │   └── CL*Kernel.h - │   │   │   └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header - │   │ ├── CPP - │   │   │   ├── CPPKernels.h --> Includes all the CPP kernels at once - │   │ │   └── kernels --> Folder containing all the CPP kernels - │   │   │      └── CPP*Kernel.h - │   │   ├── GLES_COMPUTE - │   │   │   ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context. - │   │   │   ├── GCKernels.h --> Includes all the GLES kernels at once - │   │   │   ├── GLES specialisation of all the generic interfaces (IGCTensor etc.) - │   │   │   ├── kernels --> Folder containing all the GLES kernels - │   │   │   │   └── GC*Kernel.h - │   │   │   └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header - │   │   ├── NEON - │   │   │   ├── kernels --> Folder containing all the NEON kernels - │   │   │   │ ├── assembly --> headers for assembly optimised NEON kernels. - │   │   │   │ ├── convolution --> headers for convolution assembly optimised NEON kernels. - │   │   │   │   │   ├── common --> headers for code which is common to several convolution implementations. - │   │   │   │   │   ├── depthwise --> headers for Depthwise convolution assembly implementation - │   │   │   │   │   └── winograd --> headers for Winograd convolution assembly implementation - │   │   │   │ ├── detail --> Common code for several intrinsics implementations. - │   │   │   │   └── NE*Kernel.h - │   │   │   ├── wrapper --> NEON wrapper used to simplify code - │   │   │   │ ├── intrinsics --> NEON intrinsics wrappers - │   │   │   │ ├── scalar --> Scalar operations - │   │   │   │ ├── traits.h --> Traits defined on NEON vectors - │   │   │   │   └── wrapper.h --> Includes all wrapper headers at once - │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once - │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.) - │   │   ├── All generic interfaces (ITensor, IArray, etc.) - │   │   └── Objects metadata classes (TensorInfo, MultiImageInfo) - │   ├── graph - │   │   ├── algorithms --> Generic algorithms used by the graph backend (e.g Order of traversal) - │   │   ├── backends --> The backend specific code - │   │   │   ├── CL --> OpenCL specific operations - │   │   │   ├── GLES --> OpenGLES Compute Shaders specific operations - │   │   │   └── NEON --> NEON specific operations - │   │   ├── detail --> Collection of internal utilities. - │   │   ├── frontend --> Code related to the stream frontend interface. - │   │   ├── mutators --> Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.) - │   │   ├── nodes --> The various nodes supported by the graph API - │   │   ├── printers --> Debug printers - │   │   └── Graph objects interfaces (INode, ITensorAccessor, Graph, etc.) - │   └── runtime - │   ├── common - │ │ └── Common utility code used by all backends - │   ├── CL - │   │   ├── CL objects & allocators (CLArray, CLTensor, etc.) - │   │   ├── functions --> Folder containing all the OpenCL functions - │   │   │   └── CL*.h - │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner. - │   │   ├── CLFunctions.h --> Includes all the OpenCL functions at once - │   │   ├── ICLTuner.h --> Interface used to tune the local work-group size of OpenCL kernels - │   │   └── tuners - │   │      └── Local workgroup size tuners for specific architectures / GPUs - │   ├── CPP - │      │   ├── CPPKernels.h --> Includes all the CPP functions at once. - │   │   ├── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel - │   │   └── functions --> Folder containing all the CPP functions - │   │      └── CPP*.h - │   ├── GLES_COMPUTE - │   │   ├── GLES objects & allocators (GCArray, GCTensor, etc.) - │   │   ├── functions --> Folder containing all the GLES functions - │   │   │   └── GC*.h - │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue. - │   │   └── GCFunctions.h --> Includes all the GLES functions at once - │   ├── NEON - │   │ ├── functions --> Folder containing all the NEON functions - │   │ │   └── NE*.h - │   │ └── NEFunctions.h --> Includes all the NEON functions at once - │   ├── OMP - │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler) - │ ├── Memory & weights manager files (LifetimeManager, PoolManager, etc.) - │   └── Basic implementations of the generic object interfaces (Array, Tensor, etc.) - ├── data --> Contains test images and reference data dumps used by validation tests - ├── docs --> Contains Doxyfile and Doxygen sources used to generate the HTML pages. - ├── examples - │   ├── gemm_tuner - │   │ └── OpenCL GEMM tuner utility - │   ├── cl_*.cpp --> OpenCL examples - │   ├── gc_*.cpp --> GLES compute shaders examples - │   ├── graph_*.cpp --> Graph examples - │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples - │   └── neon_*.cpp --> NEON examples - ├── include - │   ├── CL - │   │ └── Khronos OpenCL C headers and C++ wrapper - │   ├── half --> FP16 library available from http://half.sourceforge.net - │   ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy - │  ├── linux --> Headers only needed for Linux builds - │   │ └── Khronos EGL and OpenGLES headers - │ └── stb - │ └── stb_image.h --> Single header library to load image files, available from https://github.com/nothings/stb - ├── scripts - │   ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files - │   └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files - ├── src - │   ├── core - │ │ └── ... (Same structure as headers) - │   │ ├── CL - │   │ │ └── cl_kernels --> All the OpenCL kernels - │   │ └── GLES_COMPUTE - │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders - │   ├── graph - │ │ └── ... (Same structure as headers) - │ └── runtime - │ └── ... (Same structure as headers) - ├── support - │ └── Various headers to work around toolchains / platform issues. - ├── tests - │   ├── All test related files shared between validation and benchmark - │   ├── benchmark --> Sources for benchmarking - │ │ ├── Benchmark specific files - │   │ ├── fixtures - │ │ │ └── Backend agnostic fixtures to initialise and run the functions to test. - │ │ ├── CL --> OpenCL benchmarking tests - │ │ ├── GLES_COMPUTE --> GLES benchmarking tests - │ │ └── NEON --> NEON benchmarking tests - │ ├── benchmark_examples --> Sources needed to wrap examples to run through our benchmarking framework. - │   ├── CL --> OpenCL accessors - │   ├── GLES_COMPUTE --> GLES accessors - │   ├── NEON --> NEON accessors - │   ├── datasets - │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc. - │   ├── framework - │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.) - │   ├── instruments --> User defined instruments that can be registered to the framework. - │ ├── validate_examples --> Sources needed to wrap examples to run through our validation framework. - │   └── validation --> Sources for validation - │ ├── Validation specific files - │   ├── fixtures - │ │ └── Backend agnostic fixtures to initialise and run the functions to test. - │   ├── reference - │ │ └── Reference implementation used to validate the results of the various backends. - │ ├── CL --> OpenCL validation tests - │ ├── GLES_COMPUTE --> GLES validation tests - │ ├── CPP --> C++ reference implementations - │ └── NEON --> NEON validation tests - └── utils --> Boiler plate code used by examples - └── Various utilities to print types, load / store assets, etc. + For detailed information about file organization, please refer to Files -> File List section of this documentation. @section S2_versions_changelog Release versions and changelog diff --git a/docs/ComputeLibrary.dir b/docs/ComputeLibrary.dir new file mode 100644 index 0000000000..56451134d9 --- /dev/null +++ b/docs/ComputeLibrary.dir @@ -0,0 +1,364 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +/** @file Android.bp + * @brief Generation script for building AndroidNN driver. + */ + +/** @dir arm_compute + * @brief All the arm_compute headers. + */ + +/** @dir arm_compute/core + * @brief Core module: common basic types and kernels. + */ + +/** @dir arm_compute/core/CL + * @brief OpenCL backend core: kernels and utilities. + */ + +/** @file arm_compute/core/CL/CLKernelLibrary.h + * @brief Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context. + */ + +/** @file arm_compute/core/CL/CLKernels.h + * @brief Includes all the OpenCL kernels at once + */ + +/** @file arm_compute/core/CL/OpenCL.h + * @brief Wrapper to configure the Khronos OpenCL C++ header + */ + +/** @dir arm_compute/core/CL/gemm + * @brief Folder containing all the configuration files for GEMM + */ + +/** @dir arm_compute/core/CL/kernels + * @brief Folder containing all the OpenCL kernels + */ + +/** @dir arm_compute/core/CPP + * @brief CPP backend core: kernels and utilities. + */ + +/** @file arm_compute/core/CPP/CPPKernels.h + * @brief Includes all the CPP kernels at once + */ + +/** @dir arm_compute/core/CPP/kernels + * @brief Folder containing all the CPP kernels + */ + +/** @dir arm_compute/core/experimental + * @brief All experimental interfaces + */ + +/** @dir arm_compute/core/GLES_COMPUTE + * @brief OpenGLES backend core: kernels and utilities. + */ + +/** @file arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h + * @brief Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context. + */ + +/** @file arm_compute/core/GLES_COMPUTE/GCKernels.h + * @brief Includes all the GLES kernels at once + */ + +/** @file arm_compute/core/GLES_COMPUTE/OpenGLES.h + * @brief Wrapper to configure the Khronos EGL and OpenGL ES C header + */ + +/** @dir arm_compute/core/GLES_COMPUTE/kernels + * @brief Folder containing all the GLES kernels + */ + +/** @dir arm_compute/core/NEON + * @brief NEON backend core: kernels and utilities. + */ + +/** @file arm_compute/core/NEON/NEKernels.h + * @brief Includes all the NEON kernels at once + */ + +/** @dir arm_compute/core/NEON/kernels + * @brief Folder containing all the NEON kernels + */ + +/** @dir arm_compute/core/NEON/kernels/detail + * @brief Common code for several intrinsics implementations. + */ + +/** @dir arm_compute/core/NEON/wrapper + * @brief NEON wrapper used to simplify code + */ + +/** @file arm_compute/core/NEON/wrapper/traits.h + * @brief Traits defined on NEON vectors + */ + +/** @file arm_compute/core/NEON/wrapper/wrapper.h + * @brief Includes all wrapper headers at once + */ + +/** @dir arm_compute/core/NEON/wrapper/intrinsics + * @brief NEON intrinsics wrappers + */ + +/** @dir arm_compute/core/NEON/wrapper/scalar + * @brief Scalar operations + */ + +/** @dir arm_compute/core/utils + * @brief Common core utilities. + */ + +/** @dir arm_compute/graph + * @brief Graph API. + */ + +/** @dir arm_compute/graph/algorithms + * @brief Generic algorithms used by the graph backend (e.g Order of traversal) + */ + +/** @dir arm_compute/graph/backends + * @brief The backend specific code + */ + +/** @dir arm_compute/graph/backends/CL + * @brief OpenCL specific operations + */ + +/** @dir arm_compute/graph/backends/GLES + * @brief OpenGLES specific operations + */ + +/** @dir arm_compute/graph/backends/NEON + * @brief NEON specific operations + */ + +/** @dir arm_compute/graph/detail + * @brief Collection of internal utilities. + */ + +/** @dir arm_compute/graph/frontend + * @brief Code related to the stream frontend interface. + */ + +/** @dir arm_compute/graph/mutators + * @brief Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.) + */ + +/** @dir arm_compute/graph/nodes + * @brief The various nodes supported by the graph API. + */ + +/** @dir arm_compute/graph/printers + * @brief Debug printers. + */ + +/** @file arm_compute/graph.h + * @brief Includes all the Graph headers at once. + */ + +/** @dir arm_compute/runtime + * @brief Runtime interface: memory, scheduler, functions. + */ + +/** @dir arm_compute/runtime/CL + * @brief OpenCL backend runtime interface. + */ + +/** @file arm_compute/runtime/CL/CLFunctions.h + * @brief Includes all the OpenCL functions at once + */ + +/** @file arm_compute/runtime/CL/CLScheduler.h + * @brief Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner. + */ + +/** @file arm_compute/runtime/CL/ICLTuner.h + * @brief Interface used to tune the local work-group size of OpenCL kernels. + */ + +/** @dir arm_compute/runtime/CL/functions + * @brief Folder containing all the OpenCL functions. + */ + +/** @dir arm_compute/runtime/CL/tuners + * @brief Local workgroup size tuners for specific architectures / GPUs. + */ + +/** @dir arm_compute/runtime/CPP + * @brief CPP backend runtime interface. + */ + +/** @file arm_compute/runtime/CPP/CPPScheduler.h + * @brief Basic pool of threads to execute CPP/NEON code on several cores in parallel. + */ + +/** @dir arm_compute/runtime/CPP/functions + * @brief Folder containing all the CPP functions. + */ + +/** @dir arm_compute/runtime/experimental + * @brief Experimental runtime interface. + */ + +/** @dir arm_compute/runtime/GLES_COMPUTE + * @brief OpenGLES backend runtime interface. + */ + +/** @file arm_compute/runtime/GLES_COMPUTE/GCFunctions.h + * @brief Includes all the OpenGLES functions at once + */ + +/** @file arm_compute/runtime/GLES_COMPUTE/GCScheduler.h + * @brief Interface to enqueue GLES kernels and get/set the GLES CommandQueue. + */ + +/** @dir arm_compute/runtime/GLES_COMPUTE/functions + * @brief Folder containing all the GLES functions. + */ + +/** @dir arm_compute/runtime/NEON + * @brief NEON backend runtime interface. + */ + +/** @file arm_compute/runtime/NEON/NEFunctions.h + * @brief Includes all the NEON functions at once. + */ + +/** @dir arm_compute/runtime/NEON/functions + * @brief Folder containing all the NEON functions. + */ + +/** @dir arm_compute/runtime/OMP + * @brief OpenMP backend runtime interface. + */ + +/** @file arm_compute/runtime/OMP/OMPScheduler.h + * @brief OpenMP scheduler (Alternative to the CPPScheduler). + */ + +/** @dir arm_compute/runtime/common + * @brief Common utility code used by all backends. + */ + +/** @dir docs + * @brief Doxyfile and Doxygen sources used to generate this documentation. + */ + +/** @dir ./examples + * @brief Set of examples using the Compute Library + * + * @details Examples have the following structure: + * + * -# cl_*.cpp --> OpenCL examples + * -# gc_*.cpp --> GLES compute shaders examples + * -# graph_*.cpp --> Graph examples + * -# neoncl_*.cpp --> NEON / OpenCL interoperability examples + * -# neon_*.cpp --> NEON examples + */ + +/** @dir examples/gemm_tuner + * @brief OpenCL GEMM tuner utility. + */ + +/** @dir scripts + * @brief Utility scripts. + */ + +/** @file scripts/caffe_data_extractor.py + * @brief Basic script to export weights from Caffe to npy files. + */ + +/** @file scripts/tensorflow_data_extractor.py + * @brief Basic script to export weights from TensorFlow to npy files. + */ + +/** @dir src + * @brief Source code implementing all the arm_compute headers. + */ + +/** @dir src/core/CL/cl_kernels + * @brief All the OpenCL kernels + */ + +/** @dir support + * @brief Various headers to work around toolchains / platform issues. + */ + +/** @dir tests + * @brief All test related files shared between validation and benchmark. + */ + +/** @dir tests/CL + * @brief OpenCL accessors. + */ + +/** @dir tests/GLES_COMPUTE + * @brief GLES accessors. + */ + +/** @dir tests/NEON + * @brief NEON accessors. + */ + +/** @dir tests/benchmark + * @brief Sources for benchmarking. + */ + +/** @dir tests/benchmark/CL + * @brief OpenCL benchmarking tests. + */ + +/** @dir tests/benchmark/GLES_COMPUTE + * @brief GLES benchmarking tests. + */ + +/** @dir tests/benchmark/NEON + * @brief NEON benchmarking tests. + */ + +/** @dir tests/benchmark_examples + * @brief Sources needed to wrap examples to run through our benchmarking framework. + */ + +/** @dir tests/framework + * @brief Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.) + */ + +/** @dir tests/instruments + * @brief User defined instruments that can be registered to the framework. + */ + +/** @dir tests/validate_examples + * @brief Sources needed to wrap examples to run through our validation framework. + */ + +/** @dir tests/validation + * @brief Source for validation. + */ + +/** @dir tests/validation/CL + * @brief OpenCL validation tests. + */ + +/** @dir tests/validation/CPP + * @brief C++ validation tests. + */ + +/** @dir tests/validation/GLES_COMPUTE + * @brief GLES validation tests. + */ + +/** @dir tests/validation/NEON + * @brief NEON validation tests. + */ + +/** @dir tests/validation/reference + * @brief Reference implementation used to validate the results of the various backends. + */ diff --git a/docs/Doxyfile b/docs/Doxyfile index 7f5aa5bdbe..bdc4b776d3 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = cl=C +EXTENSION_MAPPING = cl=C bp=C dir=C # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -776,11 +776,14 @@ INPUT = ./docs/00_introduction.dox \ ./docs/05_contribution_guidelines.dox \ ./docs/06_functions_list.dox \ ./docs/07_errata.dox \ + ./docs/ComputeLibrary.dir \ ./arm_compute/ \ ./src/ \ ./examples/ \ ./tests/ \ ./utils/ \ + ./Android.bp \ + ./scripts \ ./support/ # This tag can be used to specify the character encoding of the source files @@ -843,6 +846,8 @@ FILE_PATTERNS = *.c \ *.qsf \ *.as \ *.js \ + *.bp \ + *.dir \ *.cl # The RECURSIVE tag can be used to specify whether or not subdirectories should diff --git a/utils/Utils.h b/utils/Utils.h index c5db56d6f0..1941d37476 100644 --- a/utils/Utils.h +++ b/utils/Utils.h @@ -24,6 +24,10 @@ #ifndef __UTILS_UTILS_H__ #define __UTILS_UTILS_H__ +/** @dir . + * brief Boiler plate code used by examples. Various utilities to print types, load / store assets, etc. + */ + #include "arm_compute/core/Helpers.h" #include "arm_compute/core/ITensor.h" #include "arm_compute/core/Types.h" -- cgit v1.2.1