Skip to content

Commit b28a888

Browse files
committed
Update on "[wip] Introduce MergedDataMap"
Differential Revision: [D76529405](https://our.internmc.facebook.com/intern/diff/D76529405/) [ghstack-poisoned]
2 parents 59bb3df + 608a611 commit b28a888

File tree

143 files changed

+4392
-1005
lines changed

Some content is hidden

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

143 files changed

+4392
-1005
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5616fa4a68718ead203314a3467f7dd9547153ae
1+
9b498d3bb28b8e3411ce464dd2755c5b96d92c8f

.ci/docker/common/install_conda.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1313
install_miniconda() {
1414
BASE_URL="https://repo.anaconda.com/miniconda"
1515
CONDA_FILE="Miniconda3-py${PYTHON_VERSION//./}_${MINICONDA_VERSION}-Linux-x86_64.sh"
16-
if [[ $(uname -m) == "aarch64" ]]; then
16+
if [[ $(uname -m) == "aarch64" ]]; then
1717
CONDA_FILE="Miniconda3-py${PYTHON_VERSION//./}_${MINICONDA_VERSION}-Linux-aarch64.sh"
1818
fi
1919

@@ -71,4 +71,8 @@ fix_conda_ubuntu_libstdcxx() {
7171
install_miniconda
7272
install_python
7373
install_pip_dependencies
74-
fix_conda_ubuntu_libstdcxx
74+
# Hack breaks the job on aarch64 but is still necessary everywhere
75+
# else.
76+
if [ "$(uname -m)" != "aarch64" ]; then
77+
fix_conda_ubuntu_libstdcxx
78+
fi

.ci/docker/conda-env-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake=3.26.4
1+
cmake=3.31.2
22
ninja=1.10.2
33
libuv
44
llvm-openmp

.ci/scripts/check_c10_sync.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ pushd pytorch
1212
git checkout "$pytorch_pin"
1313
popd
1414
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/c10 pytorch/c10
15+
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/torch/standalone pytorch/torch/standalone

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
id: set_version
4040
shell: bash
4141
run: |
42-
VERSION="0.7.0.$(TZ='PST8PDT' date +%Y%m%d)"
42+
VERSION="0.8.0.$(TZ='PST8PDT' date +%Y%m%d)"
4343
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
4444
4545
build-demo-ios:

.github/workflows/trunk.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,36 @@ jobs:
271271
exit 1
272272
fi
273273
274+
nxp-build-test:
275+
name: nxp-build-test
276+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
277+
permissions:
278+
id-token: write
279+
contents: read
280+
with:
281+
runner: linux.2xlarge
282+
docker-image: executorch-ubuntu-22.04-arm-sdk
283+
submodules: 'recursive'
284+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
285+
timeout: 90
286+
script: |
287+
# The generic Linux job chooses to use base env, not the one setup by the image
288+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
289+
conda activate "${CONDA_ENV}"
290+
291+
# Build
292+
cmake -DEXECUTORCH_BUILD_NXP_NEUTRON=ON -Bcmake-out .
293+
cmake --build cmake-out --target executorch_delegate_neutron --config Release
294+
295+
# Build check for the neutron backend library
296+
lib_neutron="cmake-out/backends/nxp/libexecutorch_delegate_neutron.a"
297+
if [ -f $lib_neutron ]; then
298+
echo "Neutron backend library built."
299+
else
300+
echo "Neutron backend library not found!"
301+
exit 1
302+
fi
303+
274304
test-coreml-delegate:
275305
name: test-coreml-delegate
276306
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main

.lintrunner.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ exclude_patterns = [
7676
'examples/demo-apps/apple_ios/**',
7777
'examples/demo-apps/react-native/rnllama/ios/**',
7878
'extension/apple/**',
79+
'extension/llm/apple/**',
7980
# File contains @generated
8081
'extension/llm/custom_ops/spinquant/fast_hadamard_transform_special.h',
8182
'extension/llm/custom_ops/spinquant/test/fast_hadamard_transform_special_unstrided_cpu.h',

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ if(EXECUTORCH_BUILD_CADENCE)
496496
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/cadence)
497497
endif()
498498

499+
if(EXECUTORCH_BUILD_NXP_NEUTRON)
500+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/nxp)
501+
endif()
502+
499503
if(EXECUTORCH_BUILD_COREML)
500504
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/apple/coreml)
501505
endif()
@@ -705,12 +709,8 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
705709
endif()
706710

707711
add_executable(executor_runner ${_executor_runner__srcs})
708-
if(CMAKE_BUILD_TYPE STREQUAL "Release")
709-
if(APPLE)
710-
target_link_options(executor_runner PRIVATE "LINKER:-dead_strip")
711-
else()
712-
target_link_options(executor_runner PRIVATE "LINKER:--gc-sections")
713-
endif()
712+
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
713+
target_link_options_gc_sections(executor_runner)
714714
endif()
715715
target_link_libraries(executor_runner ${_executor_runner_libs})
716716
target_compile_options(executor_runner PUBLIC ${_common_compile_options})

backends/arm/_passes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .convert_split_to_slice import ConvertSplitToSlicePass # noqa
2323
from .convert_squeezes_to_view import ConvertSqueezesToViewPass # noqa
2424
from .convert_to_clamp import ConvertToClampPass # noqa
25+
from .decompose_acosh_pass import DecomposeAcoshPass # noqa
2526
from .decompose_atan_pass import DecomposeAtanPass # noqa
2627
from .decompose_avg_pool2d import DecomposeAvgPool2d # noqa
2728
from .decompose_batch_norm_no_stats import DecomposeBatchNormNoStatsPass # noqa

backends/arm/_passes/arm_pass_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
ConvertSplitToSlicePass,
2626
ConvertSqueezesToViewPass,
2727
ConvertToClampPass,
28+
DecomposeAcoshPass,
2829
DecomposeAtanPass,
2930
DecomposeAvgPool2d,
3031
DecomposeBatchNormNoStatsPass,
@@ -151,6 +152,7 @@ def _tosa_080_BI_pipeline(self, exported_program: ExportedProgram) -> GraphModul
151152

152153
def _tosa_080_MI_pipeline(self, exported_program: ExportedProgram) -> GraphModule:
153154
self.add_pass(DecomposeRoundPass())
155+
self.add_pass(DecomposeAcoshPass())
154156
self.add_pass(DecomposeSqrtPass())
155157
self.add_pass(DecomposeAtanPass())
156158
self.add_pass(ConvertIntPowToMuls())

0 commit comments

Comments
 (0)