Skip to content

Arm backend: Pin pybind11 version when installing tosa_serialization#18036

Open
tom-arm wants to merge 3 commits intopytorch:mainfrom
tom-arm:pin_pybind11
Open

Arm backend: Pin pybind11 version when installing tosa_serialization#18036
tom-arm wants to merge 3 commits intopytorch:mainfrom
tom-arm:pin_pybind11

Conversation

@tom-arm
Copy link
Collaborator

@tom-arm tom-arm commented Mar 10, 2026

  • To account for potential edge cases of pybind11 drifting
  • Will be removed when tosa-tools is installed from pypi

Change-Id: I197d3c141bd8918a8debaba55adcdc9fb296ba17

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

* To account for potential edge cases of pybind11 drifting
* Will be removed when tosa-tools is installed from pypi

Signed-off-by: Tom Allsop <tom.allsop@arm.com>
Change-Id: I197d3c141bd8918a8debaba55adcdc9fb296ba17
@tom-arm tom-arm requested a review from digantdesai as a code owner March 10, 2026 09:30
Copilot AI review requested due to automatic review settings March 10, 2026 09:30
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 10, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18036

Note: Links to docs will display an error until the docs builds have been completed.

❌ 5 New Failures, 1 Cancelled Job, 1 Pending, 1 Unrelated Failure

As of commit 48d0a73 with merge base e458023 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2026
@tom-arm tom-arm added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins pybind11 to a specific version to make local/CI installation of tosa_serialization more deterministic and avoid issues from dependency drift until tosa-tools can be installed from PyPI.

Changes:

  • Add pybind11==2.10.4 to the ARM TOSA requirements file.
  • Explicitly install pybind11==2.10.4 in the Linux CMake unit test CI script before installing tosa_serialization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
backends/arm/requirements-arm-tosa.txt Pins pybind11 for ARM/TOSA dependency installs.
.ci/scripts/unittest-linux-cmake.sh Installs pinned pybind11 in CI prior to building/installing tosa_serialization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -7,3 +7,4 @@ ml_dtypes == 0.5.1
flatbuffers == 24.3.25
tosa-adapter-model-explorer == 0.1.0
ai-edge-model-explorer >= 0.1.16
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pybind11 version is pinned here, but the same version is also hard-coded in .ci/scripts/unittest-linux-cmake.sh. This duplication is easy to let drift and can create CI vs local setup mismatches. Consider centralizing the pin (e.g., a shared constraints file or having CI install from this requirements file) or add an explicit note that the CI script must be kept in sync.

Suggested change
ai-edge-model-explorer >= 0.1.16
ai-edge-model-explorer >= 0.1.16
# NOTE: pybind11 version must be kept in sync with .ci/scripts/unittest-linux-cmake.sh

Copilot uses AI. Check for mistakes.
TOSA_SERIALIZATION_DIR="${TOSA_TOOLS_DIR}/serialization"
fi

python -m pip install pybind11==2.10.4
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pybind11 pin duplicates the version in backends/arm/requirements-arm-tosa.txt. To reduce the chance of the two pins diverging, consider deriving the version from a single source (e.g., install -r backends/arm/requirements-arm-tosa.txt/a shared constraints file, or define a single variable that both paths use).

Suggested change
python -m pip install pybind11==2.10.4
python -m pip install -r backends/arm/requirements-arm-tosa.txt

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will install unnecessary dependencies, so I will not take this suggestion

Copy link
Collaborator

@zingo zingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reverts a previous fix we had the we remove last week but it is still needed so we are putting it back again. Sorry for the pingponging with this.

@zingo zingo added this to the 1.2.0 milestone Mar 10, 2026
tom-arm and others added 2 commits March 10, 2026 14:18
Copilot AI review requested due to automatic review settings March 10, 2026 14:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants