Fix portable pybindings COW ABI dependency#21019
Conversation
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.
🔗 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 SEVsThere are 2 currently active SEVs. If your PR is affected, please view them below:
✅ No FailuresAs of commit daba5bf with merge base d6ad8aa ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
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.