Skip to content

Commit a297261

Browse files
authored
Merge branch 'release/1.0' into cherry-pick-14383-by-pytorch_bot_bot_
2 parents 2383201 + 79d7e14 commit a297261

16 files changed

+79
-198
lines changed

.ci/docker/common/install_pytorch.sh

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,7 @@ install_domains() {
1717
}
1818

1919
install_pytorch_and_domains() {
20-
git clone https://github.com/pytorch/pytorch.git
21-
22-
# Fetch the target commit
23-
pushd pytorch || true
24-
git checkout "${TORCH_VERSION}"
25-
git submodule update --init --recursive
26-
27-
chown -R ci-user .
28-
29-
export _GLIBCXX_USE_CXX11_ABI=1
30-
# Then build and install PyTorch
31-
conda_run python setup.py bdist_wheel
32-
pip_install "$(echo dist/*.whl)"
33-
34-
# Grab the pinned audio and vision commits from PyTorch
35-
TORCHAUDIO_VERSION=release/2.9
36-
export TORCHAUDIO_VERSION
37-
TORCHVISION_VERSION=release/0.24
38-
export TORCHVISION_VERSION
39-
40-
install_domains
41-
42-
popd || true
43-
# Clean up the cloned PyTorch repo to reduce the Docker image size
44-
rm -rf pytorch
45-
46-
# Print sccache stats for debugging
47-
as_ci_user sccache --show-stats
20+
pip_install torch==2.9.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cpu
4821
}
4922

5023
install_pytorch_and_domains

.ci/scripts/utils.sh

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -51,67 +51,7 @@ install_domains() {
5151
}
5252

5353
install_pytorch_and_domains() {
54-
pushd .ci/docker || return
55-
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
56-
popd || return
57-
58-
git clone https://github.com/pytorch/pytorch.git
59-
60-
# Fetch the target commit
61-
pushd pytorch || return
62-
git checkout "${TORCH_VERSION}"
63-
64-
local system_name=$(uname)
65-
if [[ "${system_name}" == "Darwin" ]]; then
66-
local platform=$(python -c 'import sysconfig; import platform; v=platform.mac_ver()[0].split(".")[0]; platform=sysconfig.get_platform().split("-"); platform[1]=f"{v}_0"; print("_".join(platform))')
67-
fi
68-
local python_version=$(python -c 'import platform; v=platform.python_version_tuple(); print(f"{v[0]}{v[1]}")')
69-
local torch_release=$(cat version.txt)
70-
local torch_short_hash=${TORCH_VERSION:0:7}
71-
local torch_wheel_path="cached_artifacts/pytorch/executorch/pytorch_wheels/${system_name}/${python_version}"
72-
local torch_wheel_name="torch-${torch_release}%2Bgit${torch_short_hash}-cp${python_version}-cp${python_version}-${platform:-}.whl"
73-
74-
local cached_torch_wheel="https://gha-artifacts.s3.us-east-1.amazonaws.com/${torch_wheel_path}/${torch_wheel_name}"
75-
# Cache PyTorch wheel is only needed on MacOS, Linux CI already has this as part
76-
# of the Docker image
77-
local torch_wheel_not_found=0
78-
if [[ "${system_name}" == "Darwin" ]]; then
79-
pip install "${cached_torch_wheel}" || torch_wheel_not_found=1
80-
else
81-
torch_wheel_not_found=1
82-
fi
83-
84-
# Found no such wheel, we will build it from source then
85-
if [[ "${torch_wheel_not_found}" == "1" ]]; then
86-
echo "No cached wheel found, continue with building PyTorch at ${TORCH_VERSION}"
87-
88-
git submodule update --init --recursive
89-
USE_DISTRIBUTED=1 python setup.py bdist_wheel
90-
pip install "$(echo dist/*.whl)"
91-
92-
# Only AWS runners have access to S3
93-
if command -v aws && [[ -z "${GITHUB_RUNNER:-}" ]]; then
94-
for wheel_path in dist/*.whl; do
95-
local wheel_name=$(basename "${wheel_path}")
96-
echo "Caching ${wheel_name}"
97-
aws s3 cp "${wheel_path}" "s3://gha-artifacts/${torch_wheel_path}/${wheel_name}"
98-
done
99-
fi
100-
else
101-
echo "Use cached wheel at ${cached_torch_wheel}"
102-
fi
103-
104-
# Grab the pinned audio and vision commits from PyTorch
105-
TORCHAUDIO_VERSION=$(cat .github/ci_commit_pins/audio.txt)
106-
export TORCHAUDIO_VERSION
107-
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
108-
export TORCHVISION_VERSION
109-
110-
install_domains
111-
112-
popd || return
113-
# Print sccache stats for debugging
114-
sccache --show-stats || true
54+
pip install torch==2.9.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cpu
11555
}
11656

11757
build_executorch_runner_buck2() {

.github/workflows/android-release-artifacts.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ on:
1515
type: choice
1616
options:
1717
- "xnnpack"
18-
- "vulkan+xnnpack"
18+
- "vulkan"
1919
- "qnn"
2020
schedule:
2121
- cron: 0 10 * * *
2222

23-
concurrency:
24-
group: ${{ github.workflow }}-${{ github.ref }}
25-
cancel-in-progress: true
26-
2723
jobs:
2824
check-if-aar-exists:
2925
name: check-if-aar-exists
@@ -34,12 +30,13 @@ jobs:
3430
shell: bash
3531
run: |
3632
VERSION="${{ inputs.version }}"
33+
FLAVOR="${{ inputs.flavor }}"
3734
if [ -z "$VERSION" ]; then
3835
echo "No version name specified. Will create a snapshot AAR"
3936
exit 0
4037
fi
41-
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar" | grep "200 OK"; then
42-
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar"
38+
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}-${FLAVOR}/executorch.aar" | grep "200 OK"; then
39+
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}-${FLAVOR}/executorch.aar"
4340
echo "Will skip build/upload"
4441
exit 1
4542
fi
@@ -93,7 +90,7 @@ jobs:
9390
fi
9491
9592
FLAVOR="${{ inputs.flavor }}"
96-
if [[ "$FLAVOR" == "vulkan+xnnpack" || -z "$FLAVOR" ]]; then
93+
if [[ "$FLAVOR" == "vulkan" || -z "$FLAVOR" ]]; then
9794
curl -O https://sdk.lunarg.com/sdk/download/1.4.321.1/linux/vulkansdk-linux-x86_64-1.4.321.1.tar.xz
9895
tar xf vulkansdk-linux-x86_64-1.4.321.1.tar.xz -C /tmp
9996
export PATH="/tmp/1.4.321.1/x86_64/bin:$PATH"
@@ -148,8 +145,12 @@ jobs:
148145
pip install awscli==1.32.18
149146
AWS_CMD="aws s3 cp"
150147
VERSION="${{ inputs.version }}"
148+
FLAVOR="${{ inputs.flavor }}"
151149
if [ -z "$VERSION" ]; then
152150
VERSION="snapshot-$(date +"%Y%m%d")"
153151
fi
154-
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION}/executorch.aar --acl public-read
155-
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION}/executorch.aar.sha256sums --acl public-read
152+
if [ -z "$FLAVOR" ]; then
153+
FLAVOR="xnnpack"
154+
fi
155+
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION}-${FLAVOR}/executorch.aar --acl public-read
156+
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION}-${FLAVOR}/executorch.aar.sha256sums --acl public-read

extension/apple/ExecuTorch/Exported/ExecuTorch+Module.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
@_exported import ExecuTorch
1010

11-
@available(*, deprecated, message: "This API is experimental.")
1211
public extension TensorMetadata {
1312
/// The size of each dimension.
1413
var shape: [Int] { __shape.map(\.intValue) }
@@ -17,7 +16,6 @@ public extension TensorMetadata {
1716
var dimensionOrder: [Int] { __dimensionOrder.map(\.intValue) }
1817
}
1918

20-
@available(*, deprecated, message: "This API is experimental.")
2119
public extension MethodMetadata {
2220
/// The declared input tags.
2321
var inputValueTags: [ValueTag] {
@@ -49,7 +47,6 @@ public extension MethodMetadata {
4947
}
5048
}
5149

52-
@available(*, deprecated, message: "This API is experimental.")
5350
public extension Module {
5451
/// Executes a specific method with the provided input values.
5552
/// The method is loaded on demand if not already loaded.
@@ -94,7 +91,6 @@ public extension Module {
9491
}
9592
}
9693

97-
@available(*, deprecated, message: "This API is experimental.")
9894
public extension Module {
9995
/// Executes a specific method and decodes the outputs into `Output` generic type.
10096
///
@@ -177,7 +173,6 @@ public extension Module {
177173
}
178174
}
179175

180-
@available(*, deprecated, message: "This API is experimental.")
181176
public extension Module {
182177
/// Sets a single input value for a method at the specified index.
183178
///

0 commit comments

Comments
 (0)