Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 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
69ed8e0
Update
swolchok Aug 13, 2025
850e288
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
a64229d
Update
swolchok Aug 13, 2025
152662a
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
80a974a
rebase atop revert to unbreak tests
swolchok Aug 13, 2025
0bbfae4
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
7d6c8c5
Update
swolchok Aug 13, 2025
276f39f
Update
swolchok Aug 13, 2025
97b2cdf
Update
swolchok Aug 13, 2025
689fdc3
Update
swolchok Aug 13, 2025
ef3c565
Update
swolchok Aug 13, 2025
d412422
Update
swolchok Aug 13, 2025
39c8753
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
79bffad
rebase
swolchok Aug 14, 2025
e1db7c8
rebase
swolchok Aug 14, 2025
6278fa1
rebase
swolchok Aug 14, 2025
90bb993
rebase
swolchok Aug 14, 2025
a911797
rebase
swolchok Aug 14, 2025
6a12c42
rebase
swolchok Aug 14, 2025
3c90a4e
rebase
swolchok Aug 14, 2025
97ac217
rebase
swolchok Aug 14, 2025
0197f62
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
863a443
rebase
swolchok Aug 15, 2025
854f3ca
rebase
swolchok Aug 15, 2025
5304064
rebase
swolchok Aug 15, 2025
c054311
rebase
swolchok Aug 15, 2025
9e5ecf7
rebase
swolchok Aug 15, 2025
796338d
rebase
swolchok Aug 15, 2025
80bc1ed
rebase
swolchok Aug 15, 2025
0c4dd67
rebase
swolchok Aug 15, 2025
2344953
rebase
swolchok Aug 15, 2025
49afd80
Update
swolchok Aug 18, 2025
ad8f94e
Update
swolchok Aug 18, 2025
001ec28
Update
swolchok Aug 18, 2025
0515435
Update
swolchok Aug 18, 2025
9f16519
Update
swolchok Aug 18, 2025
158d573
Update
swolchok Aug 18, 2025
7b97a9f
Update
swolchok Aug 18, 2025
2c92cba
rebase to pacify GitHub again
swolchok Aug 19, 2025
5c0be95
rebase to pacify GitHub again
swolchok Aug 19, 2025
3270089
rebase to pacify GitHub again
swolchok Aug 19, 2025
59e942d
rebase to pacify GitHub again
swolchok Aug 19, 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
7 changes: 4 additions & 3 deletions .ci/scripts/unittest-buck2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ set -eux
# TODO: can't query //kernels/prim_ops because of non-buckified stuff in OSS.
buck2 query "//backends/apple/... + //backends/example/... + \
//backends/mediatek/... + //backends/transforms/... + \
//backends/xnnpack/... + //configurations/... + //kernels/aten/... + \
//kernels/optimized/... + //kernels/portable/... + //kernels/quantized/... + \
//kernels/test/... + //runtime/... + //schema/... + //test/... + //util/..."
//backends/xnnpack/... + //configurations/... + //extension/flat_tensor: + \
//kernels/aten/... + //kernels/optimized/... + //kernels/portable/... + \
//kernels/quantized/... + //kernels/test/... + //runtime/... + //schema/... \
+ //test/... + //util/..."

# TODO: optimized ops are unbuildable because they now use ATen; put
# them back after we can use PyTorch in OSS buck.
Expand Down
4 changes: 2 additions & 2 deletions extension/flat_tensor/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_options", "runtime")

def define_common_targets():
for aten_mode in [True, False]:
for aten_mode in get_aten_mode_options():
aten_suffix = "_aten" if aten_mode else ""
runtime.cxx_library(
name = "flat_tensor_data_map" + aten_suffix,
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ requires = [
"pip>=23", # For building the pip package.
"pyyaml", # Imported by the kernel codegen tools.
"setuptools>=63", # For building the pip package contents.
"tomli", # Imported by extract_sources.py when using python < 3.11.
"wheel", # For building the pip package archive.
"zstd", # Imported by resolve_buck.py.
"certifi", # Imported by resolve_buck.py.
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cmake>=3.29, <4.0.0 # For building binary targets in the wheel.
pip>=23 # For building the pip package.
pyyaml # Imported by the kernel codegen tools.
setuptools>=63 # For building the pip package contents.
tomli # Imported by extract_sources.py when using python < 3.11.
wheel # For building the pip package archive.
zstd # Imported by resolve_buck.py.
certifi # Imported by resolve_buck.py.
Expand Down
20 changes: 1 addition & 19 deletions shim_et/xplat/executorch/build/build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ QUANTIZED_KERNELS_SRCS = [
"kernels/quantized/cpu/op_quantize.cpp",
]

PROGRAM_SCHEMA_SRCS = [
"schema/program.fbs",
"schema/scalar_type.fbs",
]

OPTIMIZED_CPUBLAS_SRCS = [
"kernels/optimized/blas/BlasKernel.cpp",
"kernels/optimized/blas/CPUBlas.cpp",
Expand Down Expand Up @@ -375,27 +370,14 @@ THREADPOOL_SRCS = [
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",
"extension/flat_tensor/flat_tensor_data_map.cpp",
"extension/flat_tensor/serialize/flat_tensor_header.cpp",
"extension/module/module.cpp",
"extension/training/module/training_module.cpp",
"extension/training/optimizer/sgd.cpp",
]

TRAIN_XOR_SRCS = [
"extension/data_loader/file_data_loader.cpp",
"extension/data_loader/mmap_data_loader.cpp",
"extension/flat_tensor/flat_tensor_data_map.cpp",
"extension/flat_tensor/serialize/flat_tensor_header.cpp",
# REVIEW: removing this breaks the build; where is it supposed to come from?
"extension/flat_tensor/serialize/serialize.cpp",
"extension/module/module.cpp",
"extension/tensor/tensor_ptr.cpp",
"extension/tensor/tensor_ptr_maker.cpp",
"extension/training/examples/XOR/train.cpp",
"extension/training/module/training_module.cpp",
"extension/training/optimizer/sgd.cpp",
]

EXECUTOR_RUNNER_SRCS = [
Expand Down
2 changes: 0 additions & 2 deletions tools/cmake/Codegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ function(executorch_load_build_variables)
KERNELS_UTIL_ALL_DEPS_SRCS
OPTIMIZED_KERNELS_SRCS
QUANTIZED_KERNELS_SRCS
PROGRAM_SCHEMA_SRCS
OPTIMIZED_CPUBLAS_SRCS
OPTIMIZED_NATIVE_CPU_OPS_SRCS
TEST_BACKEND_COMPILER_LIB_SRCS
Expand Down Expand Up @@ -419,7 +418,6 @@ function(executorch_load_build_variables)
_kernels_util_all_deps__srcs
_optimized_kernels__srcs
_quantized_kernels__srcs
_program_schema__srcs
_optimized_cpublas__srcs
_optimized_native_cpu_ops__srcs
_test_backend_compiler_lib__srcs
Expand Down
52 changes: 0 additions & 52 deletions tools/cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,58 +67,6 @@ function(target_link_options_gc_sections target_name)
endif()
endfunction()

# Extract source files based on toml config. This is useful to keep buck2 and
# cmake aligned. Do not regenerate if file exists.
function(extract_sources sources_file)
if(EXISTS "${sources_file}")
message(STATUS "executorch: Using source file list ${sources_file}")
else()
# A file wasn't generated. Run a script to extract the source lists from the
# buck2 build system and write them to a file we can include.
#
# NOTE: This will only happen once during cmake setup, so it will not re-run
# if the buck2 targets change.
message(STATUS "executorch: Generating source file list ${sources_file}")
if(EXECUTORCH_ROOT)
set(executorch_root ${EXECUTORCH_ROOT})
else()
set(executorch_root ${CMAKE_CURRENT_SOURCE_DIR})
endif()

if(ANDROID_ABI)
if("${ANDROID_ABI}" STREQUAL "arm64-v8a")
set(target_platforms_arg "--target-platforms=shim_et//:android-arm64")
elseif("${ANDROID_ABI}" STREQUAL "x86_64")
set(target_platforms_arg "--target-platforms=shim_et//:android-x86_64")
else()
message(
FATAL_ERROR
"Unsupported ANDROID_ABI setting ${ANDROID_ABI}. Please add it here!"
)
endif()
endif()
execute_process(
COMMAND
${PYTHON_EXECUTABLE} ${executorch_root}/tools/cmake/extract_sources.py
--config=${executorch_root}/tools/cmake/cmake_deps.toml
--out=${sources_file} --buck2=${BUCK2} ${target_platforms_arg}
OUTPUT_VARIABLE gen_srcs_output
ERROR_VARIABLE gen_srcs_error
RESULT_VARIABLE gen_srcs_exit_code
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

if(NOT gen_srcs_exit_code EQUAL 0)
message("Error while generating ${sources_file}. "
"Exit code: ${gen_srcs_exit_code}"
)
message("Output:\n${gen_srcs_output}")
message("Error:\n${gen_srcs_error}")
message(FATAL_ERROR "executorch: source list generation failed")
endif()
endif()
endfunction()

# Sets the value of the PYTHON_EXECUTABLE variable to 'python' if in an active
# (non-base) conda environment, and 'python3' otherwise. This maintains
# backwards compatibility for non-conda users and avoids conda users needing to
Expand Down
Loading
Loading