Skip to content

Commit f1caefb

Browse files
authored
Merge branch 'main' into support_oss_models_2
2 parents 44fb5b2 + 1bc36c7 commit f1caefb

File tree

266 files changed

+8550
-5603
lines changed

Some content is hidden

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

266 files changed

+8550
-5603
lines changed

.Package.swift/kernels_portable/dummy.swift

Whitespace-only changes.

.Package.swift/kernels_portable_debug/dummy.swift

Whitespace-only changes.

.ci/docker/ci_commit_pins/pytorch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
59d5cf083b4f860dea76fe8936076177f9367f10
1+
01f1cc44cbbfdf6307aa01b803a4ee22f9ade946

.ci/scripts/test_ios_ci.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ say "Installing CoreML Backend Requirements"
4242

4343
./backends/apple/coreml/scripts/install_requirements.sh
4444

45-
say "Installing MPS Backend Requirements"
46-
47-
./backends/apple/mps/install_requirements.sh
48-
4945
say "Exporting Models"
5046

5147
python3 -m examples.portable.scripts.export --model_name="$MODEL_NAME" --segment_alignment=0x4000

.ci/scripts/wheel/test_linux.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
test_base.ModelTest(
1515
model=Model.Mv3,
1616
backend=Backend.XnnpackQuantizationDelegation,
17-
)
17+
),
18+
test_base.ModelTest(
19+
model=Model.Mv3,
20+
backend=Backend.CoreMlExportOnly,
21+
),
1822
]
1923
)

.ci/scripts/wheel/test_macos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
),
1818
test_base.ModelTest(
1919
model=Model.Mv3,
20-
backend=Backend.CoreMlTest,
20+
backend=Backend.CoreMlExportAndTest,
2121
),
2222
]
2323
)

.github/workflows/apple-perf.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ jobs:
188188
backends/apple/coreml/scripts/install_requirements.sh
189189
fi
190190
191-
if [[ ${{ matrix.config }} == *"mps"* ]]; then
192-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
193-
backends/apple/mps/install_requirements.sh
194-
fi
195-
196191
# Install requirements for export_llama
197192
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash examples/models/llama/install_requirements.sh
198193
@@ -379,15 +374,10 @@ jobs:
379374
# Install CoreML Backend Requirements
380375
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
381376
backends/apple/coreml/scripts/install_requirements.sh
382-
383-
# Install MPS Backend Requirements
384-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
385-
backends/apple/mps/install_requirements.sh
386377
echo "::endgroup::"
387378
388379
echo "::group::Build ExecuTorch iOS frameworks"
389-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
390-
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
380+
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output scripts/build_apple_frameworks.sh
391381
echo "::endgroup::"
392382
393383
# NB: Although exported models can be copied to this directory and bundled together with the

.github/workflows/apple.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ jobs:
154154
"backend_xnnpack"
155155
"kernels_custom"
156156
"kernels_optimized"
157-
"kernels_portable"
158157
"kernels_quantized"
158+
"threadpool"
159159
)
160160
161161
.ci/scripts/setup-conda.sh
@@ -168,13 +168,8 @@ jobs:
168168
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
169169
backends/apple/coreml/scripts/install_requirements.sh
170170
171-
# Install MPS Backend Requirements
172-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
173-
backends/apple/mps/install_requirements.sh
174-
175171
# Build iOS Frameworks
176-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
177-
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
172+
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output scripts/build_apple_frameworks.sh
178173
179174
# Bundle iOS Frameworks
180175
for FRAMEWORK in "${FRAMEWORKS[@]}"; do (
@@ -307,15 +302,10 @@ jobs:
307302
# Install CoreML Backend Requirements
308303
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
309304
backends/apple/coreml/scripts/install_requirements.sh
310-
311-
# Install MPS Backend Requirements
312-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
313-
backends/apple/mps/install_requirements.sh
314305
echo "::endgroup::"
315306
316307
echo "::group::Build ExecuTorch iOS frameworks"
317-
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
318-
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
308+
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output scripts/build_apple_frameworks.sh
319309
echo "::endgroup::"
320310
321311
echo "::group::Build ExecuTorch benchmark app"

.github/workflows/build-presets.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,30 @@ jobs:
6666
./install_requirements.sh > /dev/null
6767
cmake --preset ${{ matrix.preset }}
6868
cmake --build cmake-out -j$(( $(nproc) - 1 ))
69+
70+
windows:
71+
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
preset: [pybind]
76+
with:
77+
job-name: build
78+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
79+
submodules: recursive
80+
timeout: 90
81+
script: |
82+
set -eux
83+
conda init powershell
84+
powershell -Command "& {
85+
\$ErrorActionPreference = 'Stop'
86+
Set-PSDebug -Trace 1
87+
88+
conda create --yes --quiet -n et python=3.12
89+
conda activate et
90+
91+
python install_requirements.py
92+
cmake --preset ${{ matrix.preset }}
93+
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
94+
cmake --build cmake-out -j \$numCores
95+
}"

.github/workflows/trunk.yml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ jobs:
305305
# Install requirements
306306
${CONDA_RUN} sh install_requirements.sh
307307
${CONDA_RUN} sh backends/apple/coreml/scripts/install_requirements.sh
308-
${CONDA_RUN} python install_executorch.py --pybind coreml
308+
${CONDA_RUN} python install_executorch.py
309309
${CONDA_RUN} sh examples/models/llama/install_requirements.sh
310310
311311
# Test ANE llama
@@ -414,11 +414,7 @@ jobs:
414414
# Setup executorch
415415
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool cmake
416416
417-
if [[ "${MODE}" == "mps" ]]; then
418-
# Install mps delegate
419-
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/mps/install_requirements.sh
420-
echo "Finishing installing mps."
421-
elif [[ "${MODE}" == "coreml" ]]; then
417+
if [[ "${MODE}" == "coreml" ]]; then
422418
# Install coreml delegate
423419
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/coreml/scripts/install_requirements.sh
424420
echo "Finishing installing coreml."
@@ -504,8 +500,6 @@ jobs:
504500
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
505501
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/coreml/scripts/install_requirements.sh
506502
echo "Finishing installing coreml."
507-
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/mps/install_requirements.sh
508-
echo "Finishing installing mps."
509503
510504
# Build and test coreml model
511505
MODELS=(mv3 ic4 resnet50 edsr mobilebert w2l)
@@ -692,29 +686,3 @@ jobs:
692686
build-mode: Release
693687
build-tool: cmake
694688
docker-image: executorch-ubuntu-22.04-clang12
695-
696-
unittest-nxp-neutron:
697-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
698-
permissions:
699-
id-token: write
700-
contents: read
701-
with:
702-
runner: linux.2xlarge
703-
docker-image: executorch-ubuntu-22.04-clang12
704-
submodules: 'true'
705-
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
706-
timeout: 90
707-
script: |
708-
set -eux
709-
710-
# The generic Linux job chooses to use base env, not the one setup by the image
711-
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
712-
conda activate "${CONDA_ENV}"
713-
714-
# Build and install Executorch
715-
PYTHON_EXECUTABLE=python \
716-
CMAKE_ARGS="-DEXECUTORCH_BUILD_NXP_NEUTRON=ON" \
717-
.ci/scripts/setup-linux.sh --build-tool "cmake"
718-
719-
# Run pytest
720-
PYTHON_EXECUTABLE=python bash backends/nxp/run_unittests.sh

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@
6767
[submodule "shim"]
6868
path = shim
6969
url = https://github.com/facebook/buck2-shims-meta
70+
[submodule "third-party/json"]
71+
path = third-party/json
72+
url = https://github.com/nlohmann/json.git

.lintrunner.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,19 +386,14 @@ exclude_patterns = [
386386
"third-party/**",
387387
# TODO: remove exceptions as we migrate
388388
# backends
389-
"backends/arm/quantizer/**",
390-
"backends/arm/test/ops/**",
391389
"backends/vulkan/quantizer/**",
392390
"backends/vulkan/test/**",
393-
"backends/qualcomm/quantizer/**",
394-
"examples/qualcomm/**",
395391
"backends/xnnpack/quantizer/**",
396392
"backends/xnnpack/test/**",
397393
"exir/tests/test_passes.py",
398394
"extension/llm/export/builder.py",
399395
"extension/llm/export/quantizer_lib.py",
400396
"exir/tests/test_memory_planning.py",
401-
"backends/transforms/duplicate_dynamic_quant_chain.py",
402397
"exir/backend/test/demos/test_xnnpack_qnnpack.py",
403398
]
404399

0 commit comments

Comments
 (0)