Skip to content

Commit 2289f5d

Browse files
committed
Update base for Update on "Include audio preprocessing for raw audio tensor"
(Messed up the merge for the original stack, this is reland. Original PR with comments here - #13752) Differential Revision: [D81498748](https://our.internmc.facebook.com/intern/diff/D81498748) [ghstack-poisoned]
2 parents 33aa591 + 7cacfcd commit 2289f5d

File tree

155 files changed

+8357
-1444
lines changed

Some content is hidden

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

155 files changed

+8357
-1444
lines changed

.ci/scripts/setup-vulkan-linux-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ install_vulkan_sdk() {
4343
export PATH="${PATH}:${_vulkan_sdk_dir}/${VULKAN_SDK_VERSION}/x86_64/bin/"
4444
}
4545

46-
VULKAN_SDK_VERSION="1.3.296.0"
46+
VULKAN_SDK_VERSION="1.4.321.1"
4747

4848
install_swiftshader
4949
install_vulkan_sdk "${VULKAN_SDK_VERSION}"

.github/workflows/apple-perf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ jobs:
416416
- set-parameters
417417
secrets: inherit
418418
with:
419-
runner: macos-latest-xlarge
419+
runner: macos-14-xlarge
420420
python-version: '3.11'
421421
submodules: 'recursive'
422422
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

.github/workflows/apple.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
5050
secrets: inherit
5151
with:
52-
runner: macos-latest-xlarge
52+
runner: macos-14-xlarge
5353
python-version: '3.11'
5454
submodules: 'recursive'
5555
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
@@ -136,7 +136,7 @@ jobs:
136136
needs: set-version
137137
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
138138
with:
139-
runner: macos-latest-xlarge
139+
runner: macos-14-xlarge
140140
python-version: '3.11'
141141
submodules: 'recursive'
142142
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
@@ -276,7 +276,7 @@ jobs:
276276
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
277277
secrets: inherit
278278
with:
279-
runner: macos-latest-xlarge
279+
runner: macos-14-xlarge
280280
python-version: '3.11'
281281
submodules: 'recursive'
282282
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

.github/workflows/build-presets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
job-name: build
2424
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
25-
runner: macos-latest-xlarge
25+
runner: macos-14-xlarge
2626
python-version: 3.12
2727
submodules: recursive
2828
timeout: 90

.github/workflows/build-wheels-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
post-script: ${{ matrix.post-script }}
6464
package-name: ${{ matrix.package-name }}
6565
# Meta's macOS runners do not have Xcode, so use GitHub's runners.
66-
runner-type: macos-latest-xlarge
66+
runner-type: macos-14-xlarge
6767
setup-miniconda: true
6868
smoke-test-script: ${{ matrix.smoke-test-script }}
6969
trigger-event: ${{ github.event_name }}

.github/workflows/pull.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,13 +855,14 @@ jobs:
855855
.ci/scripts/setup-linux.sh --build-tool "cmake"
856856
857857
# Install test requirements
858-
pip install -r backends/nxp/requirements-tests.txt
858+
pip install -r backends/nxp/requirements-tests-pypi.txt
859+
pip install -r backends/nxp/requirements-tests-eiq.txt
859860
860861
# Run pytest
861862
PYTHON_EXECUTABLE=python bash backends/nxp/run_unittests.sh
862863
863864
# Run aot examples:
864-
PYTHON_EXECUTABLE=python bash examples/nxp/run_aot_example.sh cifar10
865+
PYTHON_EXECUTABLE=python bash examples/nxp/run_aot_example.sh cifar10
865866
PYTHON_EXECUTABLE=python bash examples/nxp/run_aot_example.sh mobilenetv2
866867
867868
@@ -901,6 +902,34 @@ jobs:
901902
done
902903
903904
905+
test-vulkan-operators-linux:
906+
name: test-vulkan-operators-linux
907+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
908+
permissions:
909+
id-token: write
910+
contents: read
911+
with:
912+
runner: linux.2xlarge
913+
docker-image: ci-image:executorch-ubuntu-22.04-clang12
914+
submodules: 'recursive'
915+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
916+
timeout: 90
917+
script: |
918+
set -eux
919+
920+
# The generic Linux job chooses to use base env, not the one setup by the image
921+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
922+
conda activate "${CONDA_ENV}"
923+
924+
# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
925+
source .ci/scripts/setup-vulkan-linux-deps.sh
926+
927+
# Setup python
928+
PYTHON_EXECUTABLE=python \
929+
CMAKE_ARGS="-DEXECUTORCH_BUILD_VULKAN=ON" \
930+
.ci/scripts/setup-linux.sh --build-tool "cmake"
931+
932+
PYTHON_EXECUTABLE=python bash backends/vulkan/test/custom_ops/build_and_run.sh add
904933
905934
nxp-build-test:
906935
name: nxp-build-test

.github/workflows/trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ jobs:
435435
name: test-coreml-delegate
436436
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
437437
with:
438-
runner: macos-latest-xlarge
438+
runner: macos-14-xlarge
439439
python-version: '3.11'
440440
submodules: 'recursive'
441441
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ endif()
582582

583583
if(EXECUTORCH_BUILD_EXTENSION_APPLE)
584584
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/apple)
585-
list(APPEND _executorch_extensions apple_extension)
586585
endif()
587586

588587
if(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER)
@@ -649,7 +648,6 @@ endif()
649648

650649
if(EXECUTORCH_BUILD_EXTENSION_LLM_APPLE)
651650
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/llm/apple)
652-
list(APPEND _executorch_extensions extension_llm_apple)
653651
endif()
654652

655653
if(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL)
@@ -968,6 +966,10 @@ else()
968966
endif()
969967
target_link_libraries(executorch_kernels INTERFACE ${_executorch_kernels})
970968

969+
install(TARGETS executorch_backends executorch_extensions executorch_kernels
970+
EXPORT ExecuTorchTargets
971+
)
972+
971973
if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
972974
# Baseline libraries that executor_runner will link against.
973975
set(_executor_runner_libs executorch extension_evalue_util

backends/apple/mps/serialization/mps_graph_serialize.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Copyright (c) Meta Platforms, Inc. and affiliates.
22
# All rights reserved.
3+
# Copyright 2025 Arm Limited and/or its affiliates.
34
#
45
# This source code is licensed under the BSD-style license found in the
56
# LICENSE file in the root directory of this source tree.
67

8+
import importlib.resources as _resources
79
import json
810
import os
911
import tempfile
1012

11-
import pkg_resources
13+
import executorch.backends.apple.mps.serialization as serialization_package
1214
from executorch.backends.apple.mps.serialization.mps_graph_schema import MPSGraph
1315
from executorch.exir._serialize._dataclass import _DataclassEncoder
1416
from executorch.exir._serialize._flatbuffer import _flatc_compile
@@ -19,7 +21,9 @@ def convert_to_flatbuffer(mps_graph: MPSGraph) -> bytes:
1921
with tempfile.TemporaryDirectory() as d:
2022
schema_path = os.path.join(d, "schema.fbs")
2123
with open(schema_path, "wb") as schema_file:
22-
schema_file.write(pkg_resources.resource_string(__name__, "schema.fbs"))
24+
schema_file.write(
25+
_resources.read_binary(serialization_package, "schema.fbs")
26+
)
2327
json_path = os.path.join(d, "schema.json")
2428
with open(json_path, "wb") as json_file:
2529
json_file.write(mps_graph_json.encode("ascii"))

backends/arm/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ if(EXECUTORCH_BUILD_VGF)
7373
# vgf backend
7474
list(TRANSFORM _vgf_backend_sources PREPEND "${EXECUTORCH_ROOT}/")
7575
add_library(vgf_backend ${_vgf_backend_sources})
76+
install(TARGETS vgf_backend EXPORT ExecuTorchTargets)
7677
target_include_directories(
77-
vgf_backend PUBLIC ${_common_include_directories} ${VULKAN_HEADERS_PATH}
78-
${VOLK_HEADERS_PATH}
78+
vgf_backend PRIVATE ${_common_include_directories} ${VULKAN_HEADERS_PATH}
79+
${VOLK_HEADERS_PATH}
7980
)
8081
target_compile_options(
8182
vgf_backend PRIVATE -DUSE_VULKAN_WRAPPER -DUSE_VULKAN_VOLK

0 commit comments

Comments
 (0)