Skip to content

Commit 1a86d54

Browse files
committed
Update base for Update on "[ExecuTorch] Add broadcasting support to optimized op_div"
Summary: Similar to broadcast support in op_mul Test Plan: Tests added Reviewers: Subscribers: Tasks: Tags: cc larryliu0820 manuelcandales Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815) [ghstack-poisoned]
2 parents 036f8d4 + 8148603 commit 1a86d54

File tree

87 files changed

+1199
-699
lines changed

Some content is hidden

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

87 files changed

+1199
-699
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ cmake_dependent_option(
245245
)
246246

247247
if(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)
248-
set(EXECUTORCH_BUILF_EXTENSION_DATA_LOADER ON)
248+
set(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
249249
endif()
250250

251251
if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
@@ -348,6 +348,7 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
348348
endif()
349349

350350
if(EXECUTORCH_BUILD_TESTS)
351+
set(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
351352
include(CTest)
352353
endif()
353354

@@ -373,7 +374,7 @@ if(NOT "${_repo_dir_name}" STREQUAL "executorch")
373374
"fix for this restriction."
374375
)
375376
endif()
376-
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/runtime/core/portable_type)
377+
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/runtime/core/portable_type/c10)
377378

378379
#
379380
# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.

backends/apple/coreml/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ target_include_directories(
134134
coremldelegate PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/runtime/util
135135
)
136136
target_include_directories(coremldelegate PRIVATE ${EXECUTORCH_ROOT}/..)
137-
target_include_directories(coremldelegate PRIVATE ${EXECUTORCH_ROOT}/runtime/core/portable_type)
137+
target_include_directories(coremldelegate PRIVATE ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
138138
target_compile_definitions(coremldelegate PRIVATE C10_USING_CUSTOM_GENERATED_MACROS)
139139
target_link_libraries(coremldelegate PRIVATE executorch_core)
140140

backends/apple/coreml/runtime/workspace/executorchcoreml.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@
922922
"$(SRCROOT)/../kvstore",
923923
"$(SRCROOT)/../inmemoryfs",
924924
"$(SRCROOT)/../include",
925-
"$(SRCROOT)/../include/executorch/runtime/core/portable_type",
925+
"$(SRCROOT)/../include/executorch/runtime/core/portable_type/c10",
926926
"$(SRCROOT)/../sdk",
927927
"$(SRCROOT)/../util",
928928
"$(SRCROOT)/../../third-party/nlohmann_json/single_include",
@@ -954,7 +954,7 @@
954954
"$(SRCROOT)/../kvstore",
955955
"$(SRCROOT)/../inmemoryfs",
956956
"$(SRCROOT)/../include",
957-
"$(SRCROOT)/../include/executorch/runtime/core/portable_type",
957+
"$(SRCROOT)/../include/executorch/runtime/core/portable_type/c10",
958958
"$(SRCROOT)/../sdk",
959959
"$(SRCROOT)/../util",
960960
"$(SRCROOT)/../../third-party/nlohmann_json/single_include",

backends/arm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif()
1414

1515
include(${EXECUTORCH_ROOT}/build/Utils.cmake)
1616

17-
set(_common_include_directories ${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type)
17+
set(_common_include_directories ${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10)
1818
add_compile_definitions(C10_USING_CUSTOM_GENERATED_MACROS)
1919

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

backends/arm/TARGETS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
44
python_library(
55
name = "arm_partitioner",
66
srcs = [
7-
"arm_partitioner.py",
7+
"ethosu_backend.py",
8+
"ethosu_partitioner.py",
9+
"tosa_backend.py",
10+
"tosa_partitioner.py",
811
],
912
typing = True,
1013
deps = [

backends/arm/_passes/arm_pass_manager.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from executorch.backends.arm._passes.fuse_quantized_activation_pass import ( # type: ignore[import-not-found]
5353
FuseQuantizedActivationPass,
5454
)
55-
from executorch.backends.arm._passes.insert_rescales_pass import InsertRescalePass
5655
from executorch.backends.arm._passes.insert_table_ops import InsertTableOpsPass
5756
from executorch.backends.arm._passes.keep_dims_false_to_squeeze_pass import (
5857
KeepDimsFalseToSqueezePass,
@@ -76,7 +75,6 @@
7675
UnsqueezeScalarPlaceholdersPass,
7776
)
7877
from executorch.backends.arm.tosa_specification import TosaSpecification
79-
8078
from executorch.backends.xnnpack._passes.remove_getitem_op import RemoveGetItemPass
8179
from executorch.exir import ExportedProgram
8280
from executorch.exir.pass_manager import PassManager
@@ -121,7 +119,7 @@ def _tosa_080_BI_pipeline(self, exported_program: ExportedProgram) -> GraphModul
121119
self.add_pass(ConvertSqueezesToViewPass())
122120

123121
self.add_pass(AnnotateChannelsLastDimOrder())
124-
self.add_pass(InsertRescalePass())
122+
125123
return self._transform(exported_program.graph_module)
126124

127125
def _tosa_080_MI_pipeline(self, exported_program: ExportedProgram) -> GraphModule:
@@ -159,7 +157,6 @@ def _tosa_080_MI_pipeline(self, exported_program: ExportedProgram) -> GraphModul
159157
self.add_pass(ConvertSqueezesToViewPass())
160158

161159
self.add_pass(AnnotateChannelsLastDimOrder())
162-
self.add_pass(InsertRescalePass())
163160

164161
return self._transform(exported_program.graph_module)
165162

backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ def call(self, graph_module: GraphModule) -> PassResult:
131131
n = cast(Node, n)
132132
if n.op != "call_function":
133133
continue
134-
# Don't fold chains of quant-ops into each other.
135-
if n.target in (q_op, dq_op):
136-
continue
137134

138135
# Make sure we haven't already set qparams meta information on the node
139136
assert "input_qparams" not in n.meta.keys()

backends/arm/_passes/insert_rescales_pass.py

Lines changed: 0 additions & 109 deletions
This file was deleted.

backends/arm/operators/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
op_reciprocal,
3232
op_relu,
3333
op_repeat,
34-
op_rescale,
3534
op_rshift,
3635
op_rsqrt,
3736
op_sigmoid,

backends/arm/operators/op_rescale.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)