Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
07adf1a
Update
swolchok Feb 8, 2025
bc3fd39
Update
swolchok Feb 9, 2025
00ce927
Update
swolchok Feb 10, 2025
6440d3d
Update
swolchok Feb 10, 2025
e62191a
Update
swolchok Feb 10, 2025
630bdd0
Update
swolchok Feb 10, 2025
098432f
Update
swolchok Feb 10, 2025
773ff37
Update
swolchok Feb 12, 2025
87513d8
Update
swolchok Feb 12, 2025
b61319b
Update
swolchok Feb 12, 2025
4265c31
Update
swolchok Feb 12, 2025
190bea8
Update
swolchok Feb 12, 2025
d4aaa36
Update
swolchok Feb 10, 2025
15bc325
Update
swolchok Feb 12, 2025
6b9b4cc
Update
swolchok Feb 12, 2025
ca4c14e
Update
swolchok Feb 12, 2025
372da45
Update
swolchok Feb 12, 2025
de924fe
Update
swolchok Feb 12, 2025
a0e9eb9
Update
swolchok Feb 12, 2025
4878a6b
Update
swolchok Feb 12, 2025
da6fd97
Update
swolchok Feb 12, 2025
ef00f3d
Update
swolchok Feb 12, 2025
e5edad6
Update
swolchok Feb 12, 2025
e9d552e
Update
swolchok Feb 12, 2025
8ed9894
Update
swolchok Feb 12, 2025
3f80407
Update
swolchok Feb 12, 2025
8ee4ee4
Update
swolchok Feb 12, 2025
4787a21
Update
swolchok Feb 12, 2025
8016e33
Update
swolchok Feb 12, 2025
a947148
Update
swolchok Feb 12, 2025
e3ae7b5
Update
swolchok Feb 12, 2025
827e9c5
Update
swolchok Feb 12, 2025
46df5cc
Update
swolchok Feb 12, 2025
a826c40
Update
swolchok Feb 12, 2025
6601683
Update
swolchok Feb 12, 2025
7a8397f
Update
swolchok Feb 12, 2025
d282727
Update
swolchok Feb 12, 2025
857bfa7
Update
swolchok Feb 12, 2025
f7c1205
Update
swolchok Feb 19, 2025
4b35d1e
Update
swolchok Feb 19, 2025
fe6b9c7
Update
swolchok Feb 19, 2025
6fe249c
Update
swolchok Feb 19, 2025
741d8a9
Update
swolchok Feb 19, 2025
ff128f7
Update
swolchok Feb 21, 2025
f06ee2f
Update
swolchok Feb 22, 2025
a1b9a76
Update
swolchok Feb 22, 2025
59355b9
Update
swolchok Feb 22, 2025
3c522ee
Update
swolchok Feb 22, 2025
9027194
Update
swolchok Feb 22, 2025
95cfe7d
Update
swolchok Feb 24, 2025
cb0234b
Update
swolchok Feb 24, 2025
0d53925
Update
swolchok Feb 24, 2025
3b24ef4
Update
swolchok Feb 24, 2025
5a920ed
Update
swolchok Feb 24, 2025
056ee1d
Update
swolchok Feb 24, 2025
9d8e434
Update
swolchok Feb 24, 2025
3a2d555
Update
swolchok Feb 24, 2025
b8f2a5b
Update
swolchok Feb 24, 2025
719b63d
Update
swolchok Feb 24, 2025
19bab0b
Update
swolchok Feb 24, 2025
4fde311
Update
swolchok Feb 24, 2025
f02844b
Update
swolchok Feb 25, 2025
1b47bf0
Update
swolchok Feb 25, 2025
61f045d
Update
swolchok Feb 25, 2025
4eb72d3
Update
swolchok Feb 25, 2025
9c7b3d1
Update
swolchok Feb 25, 2025
25a26e2
Update
swolchok Feb 25, 2025
aafa130
Update
swolchok Feb 25, 2025
8dc7ba0
Update
swolchok Feb 25, 2025
8d9394f
Update
swolchok Feb 25, 2025
71ef8af
Update
swolchok Feb 25, 2025
b52f223
Update
swolchok Feb 25, 2025
8df2f1d
Update
swolchok Feb 25, 2025
7f5cfd3
Update
swolchok Feb 25, 2025
832f410
Update
swolchok Feb 25, 2025
51478b5
Update
swolchok Feb 25, 2025
aa296c7
rebase
swolchok Aug 12, 2025
6e2be2b
rebase
swolchok Aug 12, 2025
4780849
rebase
swolchok Aug 12, 2025
4184f07
Update
swolchok Aug 13, 2025
da62330
Update
swolchok Aug 13, 2025
31f198c
Update
swolchok Aug 13, 2025
4d2bfd2
Update
swolchok Aug 13, 2025
d4f9a6f
Update
swolchok Aug 13, 2025
3ccf059
Update
swolchok Aug 13, 2025
c24a619
Update
swolchok Aug 13, 2025
9dbb212
Update
swolchok Aug 13, 2025
91fb965
Update
swolchok Aug 13, 2025
800800c
Update
swolchok Aug 13, 2025
1ef7f54
Update
swolchok Aug 13, 2025
3f4950a
Update
swolchok Aug 13, 2025
9d94c80
Update
swolchok Aug 13, 2025
b5f879c
Update
swolchok Aug 13, 2025
7f2ca6a
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
5f78cd5
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
6a89113
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
8ea58c0
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
f95f277
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
0db46b1
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
ea95ed2
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
ce099c5
Update
swolchok Aug 13, 2025
0f13c9f
Update
swolchok Aug 13, 2025
04d167e
Update
swolchok Aug 13, 2025
222a087
Update
swolchok Aug 13, 2025
e9c78ed
Update
swolchok Aug 13, 2025
f959b51
Update
swolchok Aug 13, 2025
9fef931
rebase
swolchok Aug 14, 2025
878efc6
rebase
swolchok Aug 14, 2025
4473fb7
rebase
swolchok Aug 14, 2025
475ba13
rebase
swolchok Aug 14, 2025
b8ad6be
rebase
swolchok Aug 14, 2025
f6126e4
rebase
swolchok Aug 14, 2025
a3b4074
rebase
swolchok Aug 15, 2025
dec04ee
rebase
swolchok Aug 15, 2025
fbfa1ac
rebase
swolchok Aug 15, 2025
74c24fe
rebase
swolchok Aug 15, 2025
a774eaa
rebase
swolchok Aug 15, 2025
8faeaca
rebase
swolchok Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions backends/apple/mps/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Provided subject to the LICENSE file in the top level directory.
#

load("@fbsource//xplat/executorch/build:build_variables.bzl", "MPS_BACKEND_BUCK_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def define_common_targets(is_xplat = False, platforms = []):
Expand Down Expand Up @@ -37,10 +38,7 @@ def define_common_targets(is_xplat = False, platforms = []):
"runtime/*.h",
"runtime/operations/*.h",
]),
"srcs": native.glob([
"runtime/*.mm",
"runtime/operations/*.mm",
]),
"srcs": MPS_BACKEND_BUCK_SRCS,
"visibility": [
"//executorch/backends/apple/...",
"//executorch/examples/...",
Expand Down
6 changes: 2 additions & 4 deletions backends/xnnpack/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@fbsource//xplat/executorch/backends/xnnpack/third-party:third_party_libs.bzl", "third_party_dep")
load("@fbsource//xplat/executorch/build:build_variables.bzl", "XNNPACK_BACKEND_BUCK_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_options", "runtime")

def _get_preprocessor_flags():
Expand Down Expand Up @@ -37,10 +38,7 @@ def define_common_targets():
aten_suffix = "_aten" if aten_mode else ""
runtime.cxx_library(
name = "xnnpack_backend" + aten_suffix,
srcs = native.glob([
"runtime/*.cpp",
"runtime/profiling/*.cpp",
]),
srcs = XNNPACK_BACKEND_BUCK_SRCS,
headers = native.glob([
"runtime/*.h",
"runtime/profiling/*.h",
Expand Down
9 changes: 4 additions & 5 deletions extension/threadpool/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@fbsource//xplat/executorch/backends/xnnpack/third-party:third_party_libs.bzl", "third_party_dep")
load("@fbsource//xplat/executorch/build:build_variables.bzl", "THREADPOOL_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def define_common_targets():
Expand All @@ -8,11 +9,9 @@ def define_common_targets():
TARGETS and BUCK files that call this function.
"""

_THREADPOOL_SRCS = [
"thread_parallel.cpp",
"threadpool.cpp",
"threadpool_guard.cpp",
] + (["fb/threadpool_use_n_threads.cpp"] if not runtime.is_oss else [])
_THREADPOOL_SRCS = THREADPOOL_SRCS + (
["fb/threadpool_use_n_threads.cpp"] if not runtime.is_oss else []
)

_THREADPOOL_HEADERS = [
"threadpool.h",
Expand Down
7 changes: 2 additions & 5 deletions kernels/portable/cpu/pattern/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PATTERN_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def define_common_targets():
Expand Down Expand Up @@ -49,11 +50,7 @@ def define_common_targets():

runtime.cxx_library(
name = "pattern",
srcs = [
"unary_ufunc_realhbbf16_to_bool.cpp",
"unary_ufunc_realhbbf16_to_floathbf16.cpp",
"unary_ufunc_realhbf16.cpp",
],
srcs = PATTERN_SRCS,
exported_headers = [
"pattern.h",
],
Expand Down
7 changes: 2 additions & 5 deletions runtime/executor/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PROGRAM_NO_PRIM_OPS_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_options", "runtime")

def _program_preprocessor_flags():
Expand Down Expand Up @@ -93,11 +94,7 @@ def define_common_targets():

runtime.cxx_library(
name = "program_no_prim_ops" + aten_suffix,
srcs = [
"method.cpp",
"method_meta.cpp",
"program.cpp",
"tensor_parser_exec_aten.cpp",
srcs = PROGRAM_NO_PRIM_OPS_SRCS + [
"tensor_parser{}.cpp".format(aten_suffix if aten_mode else "_portable"),
],
headers = [
Expand Down
9 changes: 2 additions & 7 deletions runtime/platform/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PLATFORM_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":log.bzl", "get_et_logging_flags")

Expand Down Expand Up @@ -73,13 +74,7 @@ def define_common_targets():
"runtime.h",
"compat_unistd.h",
],
srcs = [
"abort.cpp",
"log.cpp",
"platform.cpp",
"profiler.cpp",
"runtime.cpp",
],
srcs = PLATFORM_SRCS,
exported_preprocessor_flags = get_profiling_flags() + get_et_logging_flags(),
exported_deps = [
"//executorch/runtime/platform:pal_interface",
Expand Down
115 changes: 65 additions & 50 deletions shim_et/xplat/executorch/build/build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,39 @@ EXECUTORCH_SRCS = [
"kernels/prim_ops/register_prim_ops.cpp",
]

EXECUTORCH_CORE_SRCS = [
PROGRAM_NO_PRIM_OPS_SRCS = [
"method.cpp",
"method_meta.cpp",
"program.cpp",
"tensor_parser_exec_aten.cpp",
]

PLATFORM_SRCS = [
"abort.cpp",
"log.cpp",
"platform.cpp",
"profiler.cpp",
"runtime.cpp",
]

EXECUTORCH_CORE_SRCS = sorted([
"runtime/backend/interface.cpp",
"runtime/core/evalue.cpp",
"runtime/core/exec_aten/util/tensor_shape_to_c_string.cpp",
"runtime/core/exec_aten/util/tensor_util_portable.cpp",
"runtime/core/portable_type/tensor_impl.cpp",
"runtime/core/tag.cpp",
"runtime/core/tensor_layout.cpp",
"runtime/executor/method.cpp",
"runtime/executor/method_meta.cpp",
"runtime/executor/program.cpp",
"runtime/executor/pte_data_map.cpp",
"runtime/executor/tensor_parser_exec_aten.cpp",
"runtime/executor/tensor_parser_portable.cpp",
"runtime/executor/pte_data_map.cpp",
"runtime/kernel/operator_registry.cpp",
"runtime/platform/abort.cpp",
"runtime/platform/log.cpp",
"runtime/platform/platform.cpp",
"runtime/platform/profiler.cpp",
"runtime/platform/runtime.cpp",
"schema/extended_header.cpp",
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS] + ["runtime/platform/" + x for x in PLATFORM_SRCS])

PATTERN_SRCS = [
"unary_ufunc_realhbbf16_to_bool.cpp",
"unary_ufunc_realhbbf16_to_floathbf16.cpp",
"unary_ufunc_realhbf16.cpp",
]

PORTABLE_KERNELS_SRCS = [
Expand Down Expand Up @@ -221,10 +233,7 @@ PORTABLE_KERNELS_SRCS = [
"kernels/portable/cpu/op_view_copy.cpp",
"kernels/portable/cpu/op_where.cpp",
"kernels/portable/cpu/op_zeros.cpp",
"kernels/portable/cpu/pattern/unary_ufunc_realhbbf16_to_bool.cpp",
"kernels/portable/cpu/pattern/unary_ufunc_realhbbf16_to_floathbf16.cpp",
"kernels/portable/cpu/pattern/unary_ufunc_realhbf16.cpp",
]
] + ["kernels/portable/cpu/pattern/" + x for x in PATTERN_SRCS]

KERNELS_UTIL_ALL_DEPS_SRCS = [
"kernels/portable/cpu/util/activation_ops_util.cpp",
Expand Down Expand Up @@ -354,12 +363,14 @@ EXTENSION_TENSOR_SRCS = [
"extension/tensor/tensor_ptr_maker.cpp",
]

EXTENSION_THREADPOOL_SRCS = [
"extension/threadpool/thread_parallel.cpp",
"extension/threadpool/threadpool.cpp",
"extension/threadpool/threadpool_guard.cpp",
THREADPOOL_SRCS = [
"thread_parallel.cpp",
"threadpool.cpp",
"threadpool_guard.cpp",
]

EXTENSION_THREADPOOL_SRCS = ["extension/threadpool/" + x for x in THREADPOOL_SRCS]

EXTENSION_TRAINING_SRCS = [
"extension/data_loader/file_data_loader.cpp",
"extension/data_loader/mmap_data_loader.cpp",
Expand Down Expand Up @@ -426,32 +437,34 @@ MPS_EXECUTOR_RUNNER_SRCS = [
"extension/data_loader/file_data_loader.cpp",
]

MPS_BACKEND_SRCS = [
"backends/apple/mps/runtime/MPSBackend.mm",
"backends/apple/mps/runtime/MPSCompiler.mm",
"backends/apple/mps/runtime/MPSDelegateHeader.mm",
"backends/apple/mps/runtime/MPSDevice.mm",
"backends/apple/mps/runtime/MPSExecutor.mm",
"backends/apple/mps/runtime/MPSGraphBuilder.mm",
"backends/apple/mps/runtime/MPSStream.mm",
"backends/apple/mps/runtime/operations/ActivationOps.mm",
"backends/apple/mps/runtime/operations/BinaryOps.mm",
"backends/apple/mps/runtime/operations/ClampOps.mm",
"backends/apple/mps/runtime/operations/ConstantOps.mm",
"backends/apple/mps/runtime/operations/ConvolutionOps.mm",
"backends/apple/mps/runtime/operations/IndexingOps.mm",
"backends/apple/mps/runtime/operations/LinearAlgebra.mm",
"backends/apple/mps/runtime/operations/NormalizationOps.mm",
"backends/apple/mps/runtime/operations/OperationUtils.mm",
"backends/apple/mps/runtime/operations/PadOps.mm",
"backends/apple/mps/runtime/operations/PoolingOps.mm",
"backends/apple/mps/runtime/operations/QuantDequant.mm",
"backends/apple/mps/runtime/operations/RangeOps.mm",
"backends/apple/mps/runtime/operations/ReduceOps.mm",
"backends/apple/mps/runtime/operations/ShapeOps.mm",
"backends/apple/mps/runtime/operations/UnaryOps.mm",
MPS_BACKEND_BUCK_SRCS = [
"runtime/MPSBackend.mm",
"runtime/MPSCompiler.mm",
"runtime/MPSDelegateHeader.mm",
"runtime/MPSDevice.mm",
"runtime/MPSExecutor.mm",
"runtime/MPSGraphBuilder.mm",
"runtime/MPSStream.mm",
"runtime/operations/ActivationOps.mm",
"runtime/operations/BinaryOps.mm",
"runtime/operations/ClampOps.mm",
"runtime/operations/ConstantOps.mm",
"runtime/operations/ConvolutionOps.mm",
"runtime/operations/IndexingOps.mm",
"runtime/operations/LinearAlgebra.mm",
"runtime/operations/NormalizationOps.mm",
"runtime/operations/OperationUtils.mm",
"runtime/operations/PadOps.mm",
"runtime/operations/PoolingOps.mm",
"runtime/operations/QuantDequant.mm",
"runtime/operations/RangeOps.mm",
"runtime/operations/ReduceOps.mm",
"runtime/operations/ShapeOps.mm",
"runtime/operations/UnaryOps.mm",
]

MPS_BACKEND_SRCS = ["backends/apple/mps/" + x for x in MPS_BACKEND_BUCK_SRCS]

MPS_SCHEMA_SRCS = [
"backends/apple/mps/serialization/schema.fbs",
]
Expand All @@ -461,15 +474,17 @@ XNN_EXECUTOR_RUNNER_SRCS = [
"extension/data_loader/file_data_loader.cpp",
]

XNNPACK_BACKEND_SRCS = [
"backends/xnnpack/runtime/XNNCompiler.cpp",
"backends/xnnpack/runtime/XNNExecutor.cpp",
"backends/xnnpack/runtime/XNNHeader.cpp",
"backends/xnnpack/runtime/XNNPACKBackend.cpp",
"backends/xnnpack/runtime/XNNWeightsCache.cpp",
"backends/xnnpack/runtime/profiling/XNNProfiler.cpp",
XNNPACK_BACKEND_BUCK_SRCS = [
"runtime/XNNCompiler.cpp",
"runtime/XNNExecutor.cpp",
"runtime/XNNHeader.cpp",
"runtime/XNNPACKBackend.cpp",
"runtime/XNNWeightsCache.cpp",
"runtime/profiling/XNNProfiler.cpp",
]

XNNPACK_BACKEND_SRCS = ["backends/xnnpack/" + x for x in XNNPACK_BACKEND_BUCK_SRCS]

XNNPACK_SCHEMA_SRCS = [
"backends/xnnpack/serialization/runtime_schema.fbs",
]
Expand Down
Loading