Skip to content

Commit f6d7dd7

Browse files
authored
Merge branch 'main' into ci
2 parents ffcb292 + 6abe901 commit f6d7dd7

File tree

2,433 files changed

+138738
-44877
lines changed

Some content is hidden

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

2,433 files changed

+138738
-44877
lines changed

.ci/docker/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ case "${IMAGE_NAME}" in
5454
executorch-ubuntu-22.04-mediatek-sdk)
5555
MEDIATEK_SDK=yes
5656
CLANG_VERSION=12
57-
ANDROID_NDK_VERSION=r27b
57+
ANDROID_NDK_VERSION=r28c
5858
;;
5959
executorch-ubuntu-22.04-clang12-android)
6060
LINTRUNNER=""
6161
CLANG_VERSION=12
6262
# From https://developer.android.com/ndk/downloads
63-
ANDROID_NDK_VERSION=r27b
63+
ANDROID_NDK_VERSION=r28c
6464
;;
6565
*)
6666
echo "Invalid image name ${IMAGE_NAME}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
40b02a2dc61bbf901a2df91719f47c98d65368ec
1+
467660923a5a25e4718e1d6697b93ff1bab4e807
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e7152ff8a6a929a0db7f3f4a72a5b6d471769cd3
1+
e6f766c7d750d40603eee3f66c5915bac606b3ea

.ci/docker/requirements-ci.txt

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
mpmath==1.3.0
22
numpy>=2.0.0; python_version >= '3.10'
33
PyYAML==6.0.1
4-
ruamel.yaml==0.17.32
4+
ruamel.yaml==0.18.15
55
sympy==1.12
66
timm==0.6.13
77
tomli==2.0.1
88
torchsr==1.0.4
9-
transformers==4.47.1
9+
transformers==4.56.1
1010
zstd==1.5.5.1
1111
pandas>=2.2.2; python_version >= '3.10'
1212
pytest==7.2.0
@@ -16,18 +16,21 @@ hypothesis==6.84.2
1616
parameterized==0.9.0
1717

1818
# Doc build requirements, same as https://github.com/pytorch/pytorch/blob/main/.ci/docker/requirements-docs.txt
19-
sphinx==5.3.0
19+
sphinx==7.2.6
20+
sphinxcontrib.katex==0.9.10
21+
breathe==4.36.0 # only if generating C++
22+
exhale==0.3.7 # only if generating C++ docs
23+
docutils==0.18.1,<0.21
24+
sphinx-design==0.6.1
25+
sphinxcontrib-mermaid==1.0.0
26+
myst-parser==3.0.1 # if want to contribute in markdown
27+
sphinx-gallery==0.14.0 # only if hosting interactive tutorials
28+
sphinx-sitemap==2.7.1
2029
sphinx-reredirects==0.1.4
21-
sphinx-gallery==0.14.0
22-
breathe==4.34.0
23-
exhale==0.2.3
24-
docutils==0.16
2530
matplotlib>=3.9.4
31+
sphinx-copybutton==0.5.2
2632
# PyTorch Theme
27-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
28-
myst-parser==0.18.1
29-
sphinx_design==0.4.1
30-
sphinx-copybutton==0.5.0
33+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
3134

3235
# script unit test requirements
3336
yaspin==3.1.0

.ci/scripts/build-qnn-sdk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build_qnn_backend() {
1818
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
1919

2020
parallelism=$(( $(nproc) - 1 ))
21-
bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number ${parallelism} --release
21+
bash backends/qualcomm/scripts/build.sh --skip_linux_android --skip_linux_embedded --job_number ${parallelism} --release
2222
}
2323

2424
set_up_aot() {
@@ -38,6 +38,7 @@ set_up_aot() {
3838
-DEXECUTORCH_BUILD_EXTENSION_EXTENSION_LLM=ON \
3939
-DEXECUTORCH_BUILD_EXTENSION_EXTENSION_LLM_RUNNER=ON \
4040
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
41+
-DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
4142
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
4243
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
4344
-DPYTHON_EXECUTABLE=python3

.ci/scripts/setup-openvino.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ set -ex
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13-
git clone https://github.com/openvinotoolkit/openvino.git
14-
cd openvino && git checkout releases/2025/1
15-
git submodule update --init --recursive
16-
sudo ./install_build_dependencies.sh
17-
mkdir build && cd build
18-
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON
19-
make -j$(nproc)
13+
# Download and install OpenVINO from release packages
14+
OPENVINO_VERSION="2025.3"
15+
OPENVINO_BUILD="2025.3.0.19807.44526285f24"
16+
OPENVINO_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
2017

21-
cd ..
22-
cmake --install build --prefix dist
18+
curl -Lo /tmp/openvino_toolkit.tgz --retry 3 --fail ${OPENVINO_URL}
19+
tar -xzf /tmp/openvino_toolkit.tgz
20+
mv openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64 openvino
2321

24-
source dist/setupvars.sh
25-
cd ../backends/openvino
22+
source openvino/setupvars.sh
23+
cd backends/openvino
2624
pip install -r requirements.txt
2725
cd scripts
2826
./openvino_build.sh --enable_python

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

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ set -ex
1111

1212
download_ai_lite_core() {
1313
API_BASE="https://soc-developer.semiconductor.samsung.com/api/v1/resource/ai-litecore/download"
14-
API_KEY="kn10SoSY3hkC-9Qny5TqD2mnqVrlupv3krnjLeBt5cY"
14+
API_KEY=$SAMSUNG_AI_LITECORE_KEY
1515

16-
VERSION="0.5"
16+
VERSION="0.7"
1717
OS_NAME="Ubuntu 22.04"
1818
OUT_FILE="/tmp/exynos-ai-litecore-v${VERSION}.tar.gz"
1919
TARGET_PATH="/tmp/exynos_ai_lite_core"
@@ -52,17 +52,8 @@ download_ai_lite_core() {
5252
install_enn_backend() {
5353
NDK_INSTALLATION_DIR=/opt/ndk
5454
rm -rf "${NDK_INSTALLATION_DIR}" && sudo mkdir -p "${NDK_INSTALLATION_DIR}"
55-
ANDROID_NDK_VERSION=r27b
55+
ANDROID_NDK_VERSION=r28c
5656

57-
pushd .
58-
cd /tmp
59-
curl -Os --retry 3 "https://ossci-android.s3.amazonaws.com/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
60-
unzip -qo "android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
61-
62-
# Print the content for manual verification
63-
ls -lah "android-ndk-${ANDROID_NDK_VERSION}"
64-
sudo mv "android-ndk-${ANDROID_NDK_VERSION}"/* "${NDK_INSTALLATION_DIR}"
65-
popd
6657
# build Exynos backend
6758
export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:-/opt/ndk}
6859
bash backends/samsung/build.sh --build all
@@ -71,7 +62,7 @@ install_enn_backend() {
7162
export PYTHONPATH=${PYTHONPATH:-}:${EXECUTORCH_ROOT}/..
7263
}
7364

74-
AI_LITE_CORE_VERSION=0.5.0
65+
AI_LITE_CORE_VERSION=0.7.0
7566

7667
download_ai_lite_core ${AI_LITE_CORE_VERSION}
7768
install_enn_backend

.ci/scripts/setup-windows-msvc.ps1

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
conda create --yes --quiet -n et python=3.12
2+
conda activate et
3+
4+
# Install cmake
5+
conda install -y cmake
6+
7+
# Activate the VS environment - this is required for MSVC to work
8+
# There are a bunch of environment variables that it requires.
9+
# See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line.
10+
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
11+
12+
# Install CI requirements
13+
pip install -r .ci/docker/requirements-ci.txt
14+
15+
# Create build directory
16+
$buildDir = "cmake-out-msvc"
17+
if (Test-Path -Path $buildDir) {
18+
Remove-Item -Path $buildDir -Recurse -Force
19+
}
20+
New-Item -Path $buildDir -ItemType Directory
21+
22+
# Configure CMake with MSVC (not ClangCL) and disable custom/quantized ops
23+
cmake -S . -B $buildDir `
24+
-DCMAKE_BUILD_TYPE=Release `
25+
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=ON `
26+
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON `
27+
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON `
28+
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON `
29+
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON `
30+
-DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON `
31+
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON `
32+
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF `
33+
-DEXECUTORCH_BUILD_KERNELS_CUSTOM_AOT=OFF `
34+
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=OFF `
35+
-DEXECUTORCH_BUILD_XNNPACK=ON `
36+
-DEXECUTORCH_BUILD_EXTENSION_LLM=ON `
37+
-DEXECUTORCH_BUILD_EXTENSION_LLM_RUNNER=ON
38+
39+
if ($LASTEXITCODE -ne 0) {
40+
Write-Host "CMake configuration failed. Exit code: $LASTEXITCODE."
41+
exit $LASTEXITCODE
42+
}
43+
44+
# Build with MSVC
45+
cmake --build $buildDir --config Release -j16
46+
47+
if ($LASTEXITCODE -ne 0) {
48+
Write-Host "Build failed. Exit code: $LASTEXITCODE."
49+
exit $LASTEXITCODE
50+
}
51+
52+
Write-Host "MSVC build completed successfully!"

.ci/scripts/setup-windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
param (
2-
[string]$editable = $false
2+
[string]$editable = "false"
33
)
44

55
conda create --yes --quiet -n et python=3.12

.ci/scripts/test-cuda-build.sh

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/bin/bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
set -exu
9+
10+
CUDA_VERSION=${1:-"12.6"}
11+
12+
echo "=== Testing ExecuTorch CUDA ${CUDA_VERSION} Build ==="
13+
14+
# Function to build and test ExecuTorch with CUDA support
15+
test_executorch_cuda_build() {
16+
local cuda_version=$1
17+
18+
echo "Building ExecuTorch with CUDA ${cuda_version} support..."
19+
echo "ExecuTorch will automatically detect CUDA and install appropriate PyTorch wheel"
20+
21+
# Check available resources before starting
22+
echo "=== System Information ==="
23+
echo "Available memory: $(free -h | grep Mem | awk '{print $2}')"
24+
echo "Available disk space: $(df -h . | tail -1 | awk '{print $4}')"
25+
echo "CPU cores: $(nproc)"
26+
echo "CUDA version check:"
27+
nvcc --version || echo "nvcc not found"
28+
nvidia-smi || echo "nvidia-smi not found"
29+
30+
echo "=== Starting ExecuTorch Installation ==="
31+
# Install ExecuTorch with CUDA support with timeout and error handling
32+
timeout 5400 ./install_executorch.sh || {
33+
local exit_code=$?
34+
echo "ERROR: install_executorch.sh failed with exit code: $exit_code"
35+
if [ $exit_code -eq 124 ]; then
36+
echo "ERROR: Installation timed out after 90 minutes"
37+
fi
38+
exit $exit_code
39+
}
40+
41+
echo "SUCCESS: ExecuTorch CUDA build completed"
42+
43+
# Verify the installation
44+
echo "=== Verifying ExecuTorch CUDA Installation ==="
45+
46+
# Test that ExecuTorch was built successfully
47+
python -c "
48+
import executorch
49+
print('SUCCESS: ExecuTorch imported successfully')
50+
"
51+
52+
# Test CUDA availability and show details
53+
python -c "
54+
try:
55+
import torch
56+
print('INFO: PyTorch version:', torch.__version__)
57+
print('INFO: CUDA available:', torch.cuda.is_available())
58+
59+
if torch.cuda.is_available():
60+
print('SUCCESS: CUDA is available for ExecuTorch')
61+
print('INFO: CUDA version:', torch.version.cuda)
62+
print('INFO: GPU device count:', torch.cuda.device_count())
63+
print('INFO: Current GPU device:', torch.cuda.current_device())
64+
print('INFO: GPU device name:', torch.cuda.get_device_name())
65+
66+
# Test basic CUDA tensor operation
67+
device = torch.device('cuda')
68+
x = torch.randn(10, 10).to(device)
69+
y = torch.randn(10, 10).to(device)
70+
z = torch.mm(x, y)
71+
print('SUCCESS: CUDA tensor operation completed on device:', z.device)
72+
print('INFO: Result tensor shape:', z.shape)
73+
74+
print('SUCCESS: ExecuTorch CUDA integration verified')
75+
else:
76+
print('WARNING: CUDA not detected, but ExecuTorch built successfully')
77+
exit(1)
78+
except Exception as e:
79+
print('ERROR: ExecuTorch CUDA test failed:', e)
80+
exit(1)
81+
"
82+
83+
echo "SUCCESS: ExecuTorch CUDA ${cuda_version} build and verification completed successfully"
84+
}
85+
86+
# Main execution
87+
echo "Current working directory: $(pwd)"
88+
echo "Directory contents:"
89+
ls -la
90+
91+
# Run the CUDA build test
92+
test_executorch_cuda_build "${CUDA_VERSION}"

0 commit comments

Comments
 (0)