Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c322218
Split the runtime out of the Python bindings extension
shoumikhin Aug 12, 2026
0c1af98
Update
shoumikhin Aug 13, 2026
c268e65
Update
shoumikhin Aug 13, 2026
dbc9d9e
Update
shoumikhin Aug 13, 2026
cf9946f
Update
shoumikhin Aug 13, 2026
b251a51
Update
shoumikhin Aug 13, 2026
c77ab69
Update
shoumikhin Aug 13, 2026
1de0fe8
Update
shoumikhin Aug 13, 2026
d2c2c23
Update
shoumikhin Aug 14, 2026
b7d7d08
Update
shoumikhin Aug 14, 2026
0014990
Update
shoumikhin Aug 14, 2026
1d34be9
Update
shoumikhin Aug 14, 2026
791f3b5
Update
shoumikhin Aug 14, 2026
c931d2a
Update
shoumikhin Aug 14, 2026
0eaf4e3
Update
shoumikhin Aug 14, 2026
a690369
Update
shoumikhin Aug 14, 2026
f0cf7c5
Update
shoumikhin Aug 14, 2026
b74750f
Update
shoumikhin Aug 14, 2026
797d682
Update
shoumikhin Aug 14, 2026
4bcd419
Update
shoumikhin Aug 15, 2026
82b75d5
Update
shoumikhin Aug 15, 2026
6ac281e
Update
shoumikhin Aug 15, 2026
10ddbe9
Update
shoumikhin Aug 15, 2026
07abf92
Update
shoumikhin Aug 15, 2026
e5bd7ab
Update
shoumikhin Aug 15, 2026
107d3c0
Update
shoumikhin Aug 15, 2026
7b0dc3e
Update
shoumikhin Aug 15, 2026
f4849ab
Update
shoumikhin Aug 15, 2026
d6c543c
Update
shoumikhin Aug 15, 2026
8b07750
Update
shoumikhin Aug 15, 2026
faf9c0f
Update
shoumikhin Aug 15, 2026
90ad462
Update
shoumikhin Aug 16, 2026
dcda51d
Update
shoumikhin Aug 16, 2026
2f93e19
Update
shoumikhin Aug 16, 2026
9336d31
Update
shoumikhin Aug 16, 2026
e38d2dc
Update
shoumikhin Aug 16, 2026
4553641
Update
shoumikhin Aug 16, 2026
b877122
Update
shoumikhin Aug 16, 2026
71cc17d
Update
shoumikhin Aug 16, 2026
1d62fbd
Update
shoumikhin Aug 16, 2026
2ca2429
Update
shoumikhin Aug 16, 2026
1cf432a
Update
shoumikhin Aug 17, 2026
0958811
Update
shoumikhin Aug 17, 2026
2f483ba
Update
shoumikhin Aug 17, 2026
fd874ca
Update
shoumikhin Aug 17, 2026
64683d3
Update
shoumikhin Aug 17, 2026
7483dd9
Update
shoumikhin Aug 17, 2026
5a6389e
Update
shoumikhin Aug 17, 2026
a54c84f
Update
shoumikhin Aug 17, 2026
e90c122
Update
shoumikhin Aug 17, 2026
5d760b0
Update
shoumikhin Aug 17, 2026
0458d41
Update
shoumikhin Aug 17, 2026
4017168
Update
shoumikhin Aug 17, 2026
75c520f
Update
shoumikhin Aug 17, 2026
d2e7fe8
Update
shoumikhin Aug 17, 2026
56ca0d2
Update
shoumikhin Aug 17, 2026
55a00ff
Update
shoumikhin Aug 18, 2026
1573e0b
Update
shoumikhin Aug 18, 2026
038e36c
Update
shoumikhin Aug 18, 2026
65e3621
Update
shoumikhin Aug 18, 2026
d6ec909
Update
shoumikhin Aug 18, 2026
1b58553
Update
shoumikhin Aug 19, 2026
34a39b0
Update
shoumikhin Aug 19, 2026
636d433
Update
shoumikhin Aug 19, 2026
b7b109a
Update
shoumikhin Aug 19, 2026
37058f6
Update
shoumikhin Aug 19, 2026
c686c3f
Update
shoumikhin Aug 19, 2026
d663a16
Update
shoumikhin Aug 19, 2026
7439020
Update
shoumikhin Aug 19, 2026
1d06139
Update
shoumikhin Aug 19, 2026
d8b5901
Update
shoumikhin Aug 19, 2026
8fedf97
Update
shoumikhin Aug 19, 2026
61824d2
Update
shoumikhin Aug 20, 2026
f736168
Update
shoumikhin Aug 20, 2026
31b5943
Update
shoumikhin Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .ci/scripts/tests/test_wheel_platform_tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

"""Unit tests for the wheel platform tag comparison.

Here rather than in the wheel checks, because the decision under test is a pure
function of two strings. Running it as part of the wheel checks meant it needed eleven
built wheels to exercise one comparison, and it still could not run on a machine that
had not built one.

The comparison had a real defect that this covers. The release pipeline builds in a
manylinux image and rewrites the wheel's file name, so the tag on the file and the tag
auditwheel reports never agree in spelling, and comparing them as text rejected every
correct wheel. No local build reproduces that rewrite, so nothing short of a unit test
catches it before CI.
"""

import sys
from pathlib import Path

import pytest

sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "wheel"))

from test_shared_libraries import ( # noqa: E402
_tag_architectures_match,
_wheel_architecture,
)


@pytest.mark.parametrize(
"claimed,supported",
[
# What the release pipeline actually produces: it builds in a manylinux image
# and rewrites the file name, while auditwheel reports a plain linux tag
# because the wheel depends on torch without vendoring torch's libraries.
("manylinux_2_28_x86_64", "linux_x86_64"),
("manylinux_2_28_aarch64", "linux_aarch64"),
# The legacy spelling, which has no underscore before its version.
("manylinux2014_x86_64", "linux_x86_64"),
("manylinux2014_aarch64", "linux_aarch64"),
# A local build, where nothing rewrites the name.
("linux_x86_64", "linux_x86_64"),
("linux_aarch64", "linux_aarch64"),
],
)
def test_accepts_tags_the_release_pipeline_produces(claimed, supported):
assert _tag_architectures_match(claimed, supported) is True


@pytest.mark.parametrize(
"claimed,supported",
[
("manylinux_2_28_aarch64", "linux_x86_64"),
("manylinux_2_28_x86_64", "linux_aarch64"),
("linux_aarch64", "linux_x86_64"),
],
)
def test_rejects_an_architecture_mismatch(claimed, supported):
"""A wheel labelled for the wrong architecture installs where it cannot run."""
assert _tag_architectures_match(claimed, supported) is False


@pytest.mark.parametrize("tag", ["win_amd64", "macosx_11_0_arm64", "any", "", "linux"])
def test_reports_a_tag_it_cannot_read(tag):
"""None, not False, so an unreadable tag is not mistaken for a mismatch."""
assert _wheel_architecture(tag) is None
assert _tag_architectures_match(tag, "linux_x86_64") is None


def test_reads_every_architecture_the_project_builds_for():
for architecture in ("x86_64", "aarch64", "i686", "ppc64le", "s390x", "armv7l"):
assert _wheel_architecture(f"linux_{architecture}") == architecture
assert _wheel_architecture(f"manylinux_2_28_{architecture}") == architecture
5 changes: 5 additions & 0 deletions .ci/scripts/wheel/pre_build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ fi
# Enable VGF in pybind wheel builds when the platform-specific build input is
# available from pip.
if [[ "$UNAME_S" == "Linux" || "$UNAME_S" == "Darwin" ]]; then
# The wheel rewrites recorded runtime paths after linking, which needs patchelf. It is declared
# under build-system requires, but that is honoured only by a frontend with build isolation and
# this path deliberately installs requirements itself, so without this the rewrite silently
# does nothing and a CUDA wheel loses its route to the NVIDIA libraries beside it.
python3 -m pip install patchelf || true
if python3 -m pip install -r \
"${GITHUB_WORKSPACE}/${REPOSITORY}/backends/arm/requirements-arm-vgf-runtime.txt"; then
export EXECUTORCH_PYBIND_ENABLE_VGF=ON
Expand Down
9 changes: 9 additions & 0 deletions .ci/scripts/wheel/test_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@

import platform
import sys
import tempfile
from pathlib import Path

import test_base
import test_shared_libraries
from examples.models import Backend, Model

if __name__ == "__main__":
Expand Down Expand Up @@ -42,6 +45,12 @@

test_base.test_cmsis_nn_install()

# The wheel ships the runtime, the kernels, the delegate, the thread
# pool and the profiler as separate shared libraries now, so check that
# each has exactly one owner and that all of them are loadable.
with tempfile.TemporaryDirectory() as work_dir:
test_shared_libraries.run_tests(Path(work_dir))

model_tests = [
test_base.ModelTest(
model=Model.Mv3,
Expand Down
10 changes: 10 additions & 0 deletions .ci/scripts/wheel/test_linux_aarch64.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import tempfile
from pathlib import Path

import test_base
import test_shared_libraries
from examples.models import Backend, Model

if __name__ == "__main__":
Expand All @@ -26,6 +30,12 @@
), f"OpenvinoBackend not found in registered backends: {registered}"
print("✓ OpenvinoBackend is registered")

# The wheel ships the runtime, the kernels, the delegate, the thread pool and
# the profiler as separate shared libraries now, so check that each has
# exactly one owner and that all of them are loadable.
with tempfile.TemporaryDirectory() as work_dir:
test_shared_libraries.run_tests(Path(work_dir))

test_base.run_tests(
model_tests=[
test_base.ModelTest(
Expand Down
Loading
Loading