Skip to content

Fix portable pybindings COW ABI dependency#21019

Open
JakeStevens wants to merge 1 commit into
pytorch:mainfrom
JakeStevens:fix-portable-pybindings-cow-abi
Open

Fix portable pybindings COW ABI dependency#21019
JakeStevens wants to merge 1 commit into
pytorch:mainfrom
JakeStevens:fix-portable-pybindings-cow-abi

Conversation

@JakeStevens

Copy link
Copy Markdown
Contributor

Summary:
Avoid at::Tensor::data_ptr() in portable pybindings input conversion by using storage-level no-COW pointer access with the tensor storage offset. This prevents _portable_lib from depending on removed or renamed COW ABI symbols in newer Torch builds.

Test Plan:
cmake --build pip-out/temp.linux-x86_64-cpython-311/cmake-out --target portable_lib --config=Release -j8
nm -D pip-out/temp.linux-x86_64-cpython-311/cmake-out/_portable_lib.cpython-311-x86_64-linux-gnu.so | c++filt | rg "c10::impl::cow|materialize_cow|is_cow_data_ptr" -n || true
Direct-loaded rebuilt _portable_lib in Python and verified ExecuTorchModule is present.

Summary:
Avoid at::Tensor::data_ptr() in portable pybindings input conversion by using storage-level no-COW pointer access with the tensor storage offset. This prevents _portable_lib from depending on removed or renamed COW ABI symbols in newer Torch builds.

Test Plan:
cmake --build pip-out/temp.linux-x86_64-cpython-311/cmake-out --target portable_lib --config=Release -j8
nm -D pip-out/temp.linux-x86_64-cpython-311/cmake-out/_portable_lib.cpython-311-x86_64-linux-gnu.so | c++filt | rg "c10::impl::cow|materialize_cow|is_cow_data_ptr" -n || true
Direct-loaded rebuilt _portable_lib in Python and verified ExecuTorchModule is present.
@pytorch-bot

pytorch-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 2 Active SEVs

There are 2 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit daba5bf with merge base d6ad8aa (image):
💚 Looks good so far! There are no failures yet. 💚

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 Jul 17, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant