Skip to content

Commit 7a277ab

Browse files
committed
rebase and squash in lint run
[ghstack-poisoned]
2 parents c23ad70 + 0211a03 commit 7a277ab

File tree

55 files changed

+1003
-883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1003
-883
lines changed

backends/arm/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ add_compile_options("-Wall" "-Werror")
1616

1717
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
1818

19-
set(_common_include_directories ${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
19+
set(_common_include_directories
20+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
21+
)
2022
add_compile_definitions(C10_USING_CUSTOM_GENERATED_MACROS)
2123

2224
# Third-party folder and Ethos-U driver inclued

backends/cadence/CMakeLists.txt

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ endif()
2222
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
2323

2424
# Let files say "include <executorch/path/to/header.h>".
25-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
26-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
25+
set(_common_include_directories
26+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
27+
)
2728

2829
add_compile_definitions(C10_USING_CUSTOM_GENERATED_MACROS)
2930

@@ -38,52 +39,58 @@ if(EXECUTORCH_CADENCE_CPU_RUNNER)
3839
executorch_target_link_options_shared_lib(executorch)
3940
executorch_target_link_options_shared_lib(portable_ops_lib)
4041

41-
target_include_directories(executorch INTERFACE ${_common_include_directories})
42+
target_include_directories(
43+
executorch INTERFACE ${_common_include_directories}
44+
)
4245

4346
find_package(
44-
gflags REQUIRED PATHS ${CMAKE_CURRENT_BINARY_DIR}/../../third-party
47+
gflags REQUIRED PATHS ${CMAKE_CURRENT_BINARY_DIR}/../../third-party
4548
)
4649

47-
add_executable(cadence_runner
48-
${EXECUTORCH_ROOT}/examples/devtools/example_runner/example_runner.cpp
50+
add_executable(
51+
cadence_runner
52+
${EXECUTORCH_ROOT}/examples/devtools/example_runner/example_runner.cpp
4953
)
5054
target_compile_options(executorch INTERFACE -DET_EVENT_TRACER_ENABLED)
5155

5256
target_include_directories(
53-
etdump INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/../../devtools/include
54-
${EXECUTORCH_ROOT}/third-party/flatcc/include
57+
etdump INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/../../devtools/include
58+
${EXECUTORCH_ROOT}/third-party/flatcc/include
5559
)
5660

5761
target_include_directories(
58-
cadence_runner PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}
59-
${_common_include_directories}
62+
cadence_runner PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}
63+
${_common_include_directories}
6064
)
6165

6266
target_link_libraries(
63-
cadence_runner
64-
executorch
65-
gflags
66-
etdump
67-
extension_data_loader
68-
bundled_program
69-
cadence_ops_lib
70-
flatccrt
67+
cadence_runner
68+
executorch
69+
gflags
70+
etdump
71+
extension_data_loader
72+
bundled_program
73+
cadence_ops_lib
74+
flatccrt
7175
)
7276
endif()
7377

7478
if(EXECUTORCH_NNLIB_OPT)
7579
set(TARGET_DIR hifi)
76-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib
77-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
80+
add_subdirectory(
81+
${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib
82+
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
83+
)
7884
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/kernels)
7985
elseif(EXECUTORCH_FUSION_G3_OPT)
8086
set(TARGET_DIR fusion_g3)
81-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib
82-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
87+
add_subdirectory(
88+
${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib
89+
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
90+
)
8391
else()
8492
set(TARGET_DIR reference)
8593
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/kernels)
8694
endif()
8795

88-
8996
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/operators)

backends/cadence/cadence.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ set(CMAKE_CXX_COMPILER ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-clang++)
4343

4444
set(CMAKE_C_FLAGS_INIT "-stdlib=libc++ -mtext-section-literals -mlongcalls")
4545
set(CMAKE_CXX_FLAGS_INIT "-stdlib=libc++ -mtext-section-literals -mlongcalls")
46-
#workaround for larger compilation time
46+
# workaround for larger compilation time
4747
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -fno-strict-aliasing")
4848

4949
set(CMAKE_SYSROOT ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})

backends/cadence/fusion_g3/operators/CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,20 @@ target_link_libraries(aten_ops_cadence PUBLIC executorch)
6969
target_link_libraries(aten_ops_cadence PRIVATE xa_nnlib)
7070

7171
# Let files say "include <executorch/path/to/header.h>".
72-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
73-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
72+
set(_common_include_directories
73+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
74+
)
7475

7576
target_include_directories(
76-
aten_ops_cadence PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}
77-
${_common_include_directories}
78-
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/algo/common/include/
79-
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/include/nnlib
80-
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/include
81-
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/algo/kernels/tables/include
77+
aten_ops_cadence
78+
PUBLIC
79+
${ROOT_DIR}/..
80+
${CMAKE_BINARY_DIR}
81+
${_common_include_directories}
82+
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/algo/common/include/
83+
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/include/nnlib
84+
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/include
85+
${EXECUTORCH_ROOT}/backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3/xa_nnlib/algo/kernels/tables/include
8286
)
8387

8488
# Generate C++ bindings to register kernels into both PyTorch (for AOT) and
@@ -93,6 +97,4 @@ generate_bindings_for_kernels(
9397
)
9498
message("Generated files ${gen_command_sources}")
9599

96-
gen_operators_lib(
97-
LIB_NAME "cadence_ops_lib" KERNEL_LIBS DEPS aten_ops_cadence
98-
)
100+
gen_operators_lib(LIB_NAME "cadence_ops_lib" KERNEL_LIBS DEPS aten_ops_cadence)

backends/cadence/hifi/kernels/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ add_library(
2828
${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/xa_nn_transpose_32.c
2929
)
3030
# Let files say "include <executorch/path/to/header.h>".
31-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
32-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
31+
set(_common_include_directories
32+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
33+
)
3334

3435
target_include_directories(
3536
cadence_kernels
@@ -39,7 +40,7 @@ target_include_directories(
3940
${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/include/nnlib
4041
${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/include
4142
${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/algo/ndsp/hifi4/include/
42-
${_common_include_directories}
43+
${_common_include_directories}
4344
)
4445

4546
target_link_libraries(cadence_kernels PRIVATE xa_nnlib)

backends/cadence/hifi/operators/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ set(_aten_ops__srcs
7272
"${EXECUTORCH_ROOT}/kernels/portable/cpu/util/select_copy_util.cpp"
7373
"${EXECUTORCH_ROOT}/kernels/portable/cpu/util/slice_util.cpp"
7474
"${EXECUTORCH_ROOT}/kernels/portable/cpu/util/delinearize_index.cpp"
75-
)
75+
)
7676
add_library(aten_ops_cadence ${_aten_ops__srcs})
7777
target_link_libraries(aten_ops_cadence PUBLIC executorch)
7878
target_link_libraries(aten_ops_cadence PRIVATE cadence_kernels)
7979

8080
# Let files say "include <executorch/path/to/header.h>".
81-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
82-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
81+
set(_common_include_directories
82+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
83+
)
8384

8485
target_include_directories(
8586
aten_ops_cadence PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}
@@ -88,9 +89,15 @@ target_include_directories(
8889

8990
# Custom ops that are needed to run the test model.
9091
add_library(
91-
custom_ops "op_quantized_linear_out.cpp" "op_quantized_layer_norm.cpp" "op_quantized_matmul_out.cpp"
92-
"op_quantize_per_tensor.cpp" "op_quantized_relu_out.cpp" "op_dequantize_per_tensor.cpp"
93-
"op_quantized_conv_out.cpp" "op_quantized_fully_connected_out"
92+
custom_ops
93+
"op_quantized_linear_out.cpp"
94+
"op_quantized_layer_norm.cpp"
95+
"op_quantized_matmul_out.cpp"
96+
"op_quantize_per_tensor.cpp"
97+
"op_quantized_relu_out.cpp"
98+
"op_dequantize_per_tensor.cpp"
99+
"op_quantized_conv_out.cpp"
100+
"op_quantized_fully_connected_out"
94101
)
95102
target_include_directories(
96103
custom_ops PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}

backends/cadence/reference/kernels/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
add_library(cadence_kernels kernels.cpp)
99

1010
# Let files say "include <executorch/path/to/header.h>".
11-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
12-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
11+
set(_common_include_directories
12+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
13+
)
1314

14-
target_include_directories(cadence_kernels PUBLIC .
15-
${_common_include_directories}
15+
target_include_directories(
16+
cadence_kernels PUBLIC . ${_common_include_directories}
1617
)

backends/cadence/reference/operators/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ target_link_libraries(aten_ops_cadence PUBLIC executorch)
6767
target_link_libraries(aten_ops_cadence PRIVATE cadence_kernels)
6868

6969
# Let files say "include <executorch/path/to/header.h>".
70-
set(_common_include_directories ${EXECUTORCH_ROOT}/..
71-
${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
70+
set(_common_include_directories
71+
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
72+
)
7273

7374
target_include_directories(
7475
aten_ops_cadence PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR}

backends/cortex_m/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
# Kernel library for Cortex-M operators. Please keep this file formatted by running:
7+
# Kernel library for Cortex-M operators. Please keep this file formatted by
8+
# running:
89
# ~~~
910
# cmake-format -i CMakeLists.txt
1011
# ~~~
@@ -29,8 +30,8 @@ set(_cortex_m_kernels__srcs
2930
${CMAKE_CURRENT_SOURCE_DIR}/ops/op_dequantize_per_tensor.cpp
3031
)
3132

32-
# Generate C++ bindings to register kernels into Executorch (for runtime).
33-
# Here select all ops in operators.yaml
33+
# Generate C++ bindings to register kernels into Executorch (for runtime). Here
34+
# select all ops in operators.yaml
3435
set(_yaml_file ${CMAKE_CURRENT_LIST_DIR}/ops/operators.yaml)
3536
gen_selected_ops(LIB_NAME "cortex_m_ops_lib" OPS_SCHEMA_YAML "${_yaml_file}")
3637

backends/mediatek/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ target_link_libraries(
3030
)
3131
target_sources(
3232
neuron_backend
33-
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronBackend.h>
34-
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronBufferAllocator.h>
35-
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronExecutor.h>
36-
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronLog.h>
37-
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/api/APUWareUtilsLib.h>
38-
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/api/NeuronAdapterShim.h>
33+
INTERFACE
34+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronBackend.h>
35+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronBufferAllocator.h>
36+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronExecutor.h>
37+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/NeuronLog.h>
38+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/api/APUWareUtilsLib.h>
39+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/runtime/include/api/NeuronAdapterShim.h>
3940
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/runtime/NeuronBackend.cpp
4041
${CMAKE_CURRENT_LIST_DIR}/runtime/NeuronExecutor.cpp
4142
${CMAKE_CURRENT_LIST_DIR}/runtime/NeuronBufferAllocator.cpp

0 commit comments

Comments
 (0)