Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions runtime/onert/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
BasedOnStyle: InheritParentConfig
IncludeBlocks: Regroup
IncludeCategories:
# external library headers
- Regex: '^(<|")((cker|half|json|absl|arm_compute|Eigen|unsupported/Eigen|flatbuffers|gtest|pybind11|ruy|tensorflow)/|(ggml\.h|h5.*\.h|H5.*\.h|public\/gemmlowp\.h))'
Priority: 10
# standard library headers
- Regex: '^<[a-z_]+>$'
Priority: 100
# In same module headers
- Regex: '^".*\.h"$'
Priority: 2
# Different module headers
- Regex: '^<.*\.h>$'
Priority: 3
# headers in the same directory
- Regex: '.*.h'
Priority: 1
KeepEmptyLinesAtTheStartOfBlocks: true
SortIncludes: true
3 changes: 1 addition & 2 deletions runtime/onert/api/nnfw/src/CustomKernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
#ifndef __ONERT_API_CUSTOM_KERNEL_H__
#define __ONERT_API_CUSTOM_KERNEL_H__

#include "nnfw_experimental.h"

#include "backend/CustomKernelBuilder.h"
#include "exec/IFunction.h"
#include "nnfw_experimental.h"

#include <vector>

Expand Down
5 changes: 2 additions & 3 deletions runtime/onert/api/nnfw/src/CustomKernelRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

#include "CustomKernel.h"

#include <unordered_map>
#include <functional>
#include <memory>

#include <iostream>
#include <memory>
#include <unordered_map>

namespace onert
{
Expand Down
3 changes: 1 addition & 2 deletions runtime/onert/api/nnfw/src/nnfw_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

#include "nnfw.h"
#include "nnfw_experimental.h"
#include "nnfw_version.h"

#include "nnfw_session.h"
#include "nnfw_version.h"

// Double-check enum value changes

Expand Down
5 changes: 3 additions & 2 deletions runtime/onert/api/nnfw/src/nnfw_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@
#include "exporter/CircleExporter.h"
#include "exporter/train/CheckpointExporter.h"
#include "ir/OpCode.h"
#include "json/json.h"
#include "loader/CircleLoader.h"
#include "loader/ModelLoader.h"
#include "loader/TFLiteLoader.h"
#include "loader/TrainInfoLoader.h"
#include "loader/train/CheckpointLoader.h"
#include "util/ConfigSource.h"
#include "util/Exceptions.h"
#include "util/logging.h"
#include "util/TracingCtx.h"
#include "util/logging.h"

#include <misc/string_helpers.h>

#include "json/json.h"

#include <fstream>
#include <iostream>
#include <string>
Expand Down
3 changes: 1 addition & 2 deletions runtime/onert/api/nnfw/src/nnfw_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
#ifndef __API_NNFW_SESSION_H__
#define __API_NNFW_SESSION_H__

#include "nnfw.h"

#include "CustomKernelRegistry.h"
#include "compiler/CompilerOptions.h"
#include "compiler/ICompiler.h"
#include "exec/Execution.h"
#include "ir/NNPkg.h"
#include "ir/train/TrainingInfo.h"
#include "nnfw.h"
#include "odc/CodegenManager.h"
#include "odc/QuantizeManager.h"

Expand Down
2 changes: 1 addition & 1 deletion runtime/onert/api/python/include/nnfw_api_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "nnfw_experimental.h"
#include "nnfw_internal.h"

#include <pybind11/stl.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>

namespace onert
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

#include <pybind11/pybind11.h>

#include "nnfw_exception_bindings.h"
#include "nnfw_session_bindings.h"
#include "nnfw_tensorinfo_bindings.h"
#include "nnfw_traininfo_bindings.h"

#include <pybind11/pybind11.h>

using namespace onert::api::python;
namespace py = pybind11;

Expand Down
1 change: 1 addition & 0 deletions runtime/onert/api/python/src/wrapper/nnfw_api_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "nnfw_api_wrapper.h"

#include "nnfw_exceptions.h"

#include <iostream>
Expand Down
11 changes: 6 additions & 5 deletions runtime/onert/backend/acl_cl/Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
#ifndef __ONERT_BACKEND_ACL_CL_BACKEND_H__
#define __ONERT_BACKEND_ACL_CL_BACKEND_H__

#include <memory>
#include <backend/Backend.h>

#include "AclTensorRegistry.h"
#include "BackendContext.h"
#include "Config.h"
#include "ConstantInitializer.h"
#include "KernelGenerator.h"
#include "TensorManager.h"
#include "Optimizer.h"
#include "AclTensorRegistry.h"
#include "TensorManager.h"

#include <backend/Backend.h>

#include <memory>

namespace onert::backend::acl_cl
{
Expand Down
4 changes: 2 additions & 2 deletions runtime/onert/backend/acl_cl/BackendContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#ifndef __ONERT_BACKEND_ACL_CL_BACKEND_CONTEXT_H__
#define __ONERT_BACKEND_ACL_CL_BACKEND_CONTEXT_H__

#include <AclBackendContext.h>

#include "ConstantInitializer.h"
#include "KernelGenerator.h"
#include "TensorBuilder.h"

#include <AclBackendContext.h>

namespace onert::backend::acl_cl
{

Expand Down
2 changes: 2 additions & 0 deletions runtime/onert/backend/acl_cl/CLTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#define __ONERT_BACKEND_ACL_CL_CLTIMER_H__

#include <util/ITimer.h>

#include <arm_compute/core/CL/OpenCL.h>
#include <arm_compute/runtime/CL/CLScheduler.h>

#include <chrono>
#include <list>
#include <sstream>
Expand Down
9 changes: 4 additions & 5 deletions runtime/onert/backend/acl_cl/Config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
*/

// For CLKernelLibraryEx initialization
#include "arm_compute/core/CL/CLHelpers.h"
#include "arm_compute/core/CL/CLKernelLibrary.h"
#include "arm_compute/core/CL/CLKernelLibraryEx.h"
#include "Config.h"

#include <util/ConfigSource.h>

#include "arm_compute/core/CL/CLHelpers.h"
#include "arm_compute/core/CL/CLKernelLibrary.h"
#include "arm_compute/core/CL/CLKernelLibraryEx.h"
#include <arm_compute/runtime/CL/CLScheduler.h>

#include "Config.h"

namespace onert::backend::acl_cl
{

Expand Down
5 changes: 4 additions & 1 deletion runtime/onert/backend/acl_cl/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
#define __ONERT_BACKEND_ACL_CL_CONFIG_H__

#include "CLTimer.h"
#include <memory>

#include <backend/IConfig.h>

#include <arm_compute/runtime/CL/CLScheduler.h>

#include <memory>

namespace onert::backend::acl_cl
{

Expand Down
4 changes: 2 additions & 2 deletions runtime/onert/backend/acl_cl/ConstantInitializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

#include "ConstantInitializer.h"

#include <AclActivationBuilder.h>
#include <AclFunction.h>
#include <Convert.h>
#include <Swizzle.h>

#include "ConstantInitializer.h"

namespace onert::backend::acl_cl
{

Expand Down
18 changes: 9 additions & 9 deletions runtime/onert/backend/acl_cl/KernelGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

#include "KernelGenerator.h"

#include <arm_compute/runtime/CL/CLFunctions.h> // Include all ARM Compute CL functions
#include <arm_compute/runtime/CL/CLFunctionsEx.h> // Include all ARM Compute EX CL functions
#include "AclKernelGen.h"
#include "exec/FunctionSequence.h"
#include "exec/NopFunction.h"
#include "ir/DataType.h"
#include "ir/Index.h"
#include "ir/InternalType.h"
#include "util/logging.h"

#include <AclActivationBuilder.h>
#include <AclFunction.h>
#include <Convert.h>
#include <Swizzle.h>

#include "ir/Index.h"
#include "ir/DataType.h"
#include "ir/InternalType.h"
#include "exec/NopFunction.h"
#include "exec/FunctionSequence.h"
#include "util/logging.h"
#include "AclKernelGen.h"
#include <arm_compute/runtime/CL/CLFunctions.h> // Include all ARM Compute CL functions
#include <arm_compute/runtime/CL/CLFunctionsEx.h> // Include all ARM Compute EX CL functions

namespace onert::backend::acl_cl
{
Expand Down
6 changes: 3 additions & 3 deletions runtime/onert/backend/acl_cl/KernelGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#ifndef __ONERT_BACKEND_ACL_CL_KERNEL_GENERATOR_H__
#define __ONERT_BACKEND_ACL_CL_KERNEL_GENERATOR_H__

#include <backend/basic/KernelGeneratorBase.h>

#include "TensorBuilder.h"
#include "AclTensorRegistry.h"
#include "TensorBuilder.h"
#include "TensorManager.h"

#include <backend/basic/KernelGeneratorBase.h>

namespace onert::backend::acl_cl
{

Expand Down
1 change: 0 additions & 1 deletion runtime/onert/backend/acl_cl/Optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "Optimizer.h"

#include <AclSubTensorAnalyzer.h>

#include <compiler/LoweredGraph.h>
#include <util/logging.h>

Expand Down
6 changes: 3 additions & 3 deletions runtime/onert/backend/acl_cl/TensorBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#ifndef __ONERT_BACKEND_ACL_CL_TENSOR_BUILDER_H__
#define __ONERT_BACKEND_ACL_CL_TENSOR_BUILDER_H__

#include <AclTensorBuilder.h>

#include "operand/CLTensor.h"
#include "operand/CLSubTensor.h"
#include "operand/CLTensor.h"

#include <AclTensorBuilder.h>

namespace onert::backend::acl_cl
{
Expand Down
21 changes: 10 additions & 11 deletions runtime/onert/backend/acl_cl/TensorManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
#ifndef __ONERT_BACKEND_ACL_CL_TENSOR_MANAGER_H__
#define __ONERT_BACKEND_ACL_CL_TENSOR_MANAGER_H__

#include <arm_compute/runtime/CL/CLBufferAllocator.h>
#include <arm_compute/runtime/PoolManager.h>
#include <arm_compute/runtime/BlobLifetimeManager.h>
#include <arm_compute/runtime/MemoryManagerOnDemand.h>
#include <arm_compute/runtime/MemoryGroup.h>
#include "operand/CLSubTensor.h"
#include "operand/CLTensor.h"
#include "util/logging.h"

#include <AclMemoryManager.h>
#include <AclLinearMemoryManager.h>
#include <AclInternalBufferManager.h>
#include <AclLinearMemoryManager.h>
#include <AclMemoryManager.h>
#include <AclTensorManager.h>

#include "operand/CLTensor.h"
#include "operand/CLSubTensor.h"

#include "util/logging.h"
#include <arm_compute/runtime/BlobLifetimeManager.h>
#include <arm_compute/runtime/CL/CLBufferAllocator.h>
#include <arm_compute/runtime/MemoryGroup.h>
#include <arm_compute/runtime/MemoryManagerOnDemand.h>
#include <arm_compute/runtime/PoolManager.h>

namespace onert::backend::acl_cl
{
Expand Down
3 changes: 2 additions & 1 deletion runtime/onert/backend/acl_cl/operand/CLSubTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#ifndef __ONERT_BACKEND_ACL_CL_OPERAND_CL_SUB_TENSOR_H__
#define __ONERT_BACKEND_ACL_CL_OPERAND_CL_SUB_TENSOR_H__

#include <arm_compute/runtime/CL/CLSubTensor.h>
#include "ICLTensor.h"

#include <arm_compute/runtime/CL/CLSubTensor.h>

namespace onert::backend::acl_cl::operand
{

Expand Down
6 changes: 3 additions & 3 deletions runtime/onert/backend/acl_cl/operand/CLTensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#include "CLTensor.h"

#include <arm_compute/runtime/CL/CLScheduler.h>
#include <Convert.h>

#include <arm_compute/runtime/CL/CLMemory.h>
#include <arm_compute/runtime/CL/CLMemoryRegion.h>

#include <Convert.h>
#include <arm_compute/runtime/CL/CLScheduler.h>

namespace onert::backend::acl_cl::operand
{
Expand Down
7 changes: 4 additions & 3 deletions runtime/onert/backend/acl_cl/operand/CLTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
#ifndef __ONERT_BACKEND_ACL_CL_OPERAND_CL_TENSOR_H__
#define __ONERT_BACKEND_ACL_CL_OPERAND_CL_TENSOR_H__

#include "ICLTensor.h"

#include "arm_compute/runtime/CL/CLTensorAllocator.h"
#include <arm_compute/core/TensorInfo.h>
#include <arm_compute/runtime/CL/CLTensor.h>
#include <arm_compute/runtime/CL/CLScheduler.h>
#include "arm_compute/runtime/CL/CLTensorAllocator.h"
#include "ICLTensor.h"
#include <arm_compute/runtime/CL/CLTensor.h>

namespace onert::backend::acl_cl::operand
{
Expand Down
2 changes: 1 addition & 1 deletion runtime/onert/backend/acl_cl/operand/ICLTensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include "ICLTensor.h"

#include <arm_compute/runtime/CL/CLScheduler.h>
#include <arm_compute/core/CL/OpenCL.h>
#include <arm_compute/runtime/CL/CLScheduler.h>

namespace onert::backend::acl_cl::operand
{
Expand Down
4 changes: 2 additions & 2 deletions runtime/onert/backend/acl_cl/operand/ICLTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#ifndef __ONERT_BACKEND_ACL_CL_OPERAND_I_CL_TENSOR_H__
#define __ONERT_BACKEND_ACL_CL_OPERAND_I_CL_TENSOR_H__

#include <arm_compute/core/CL/ICLTensor.h>

#include <IACLTensor.h>

#include <arm_compute/core/CL/ICLTensor.h>

namespace onert::backend::acl_cl::operand
{

Expand Down
Loading