pytorch/torch/csrc/stable
Mikayla Gawarecki eae701cad0 Add scaffolding for StableIValue FC/BC (no PoC) (#164332)
1. Add `extension_build_version` and `is_internal` to `FromImpl`/`ToImpl` (this will be useful for future if we need to break the BC of any type) #163832 has the PoC of how we would actually use this system
2. Add `aoti_torch_library_impl_v2` that takes in an additional `extension_build_version` argument, updates callsite in `torch/csrc/stable/library.h` to always pass `TORCH_ABI_VERSION` for this argument
3. Add `extension_build_version` to `from_ivalue` and `to_ivalue` and update all callsites
4. Add a private `_from` and `_to` that pass `is_internal=True` to `FromImpl`/`ToImpl`, making it easier to reason about what is being called from libtorch-land / extension-land

**Note: This PR does not include a linter that tells the user to update from/to if changing the ABI of a type in headeronly, which I intend to do in https://github.com/pytorch/pytorch/pull/163998**

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164332
Approved by: https://github.com/janeyx99
ghstack dependencies: #164356, #166373, #163683
2025-10-29 15:41:45 +00:00
..
c Add scaffolding for aoti_torch_call_dispatcher BC with native ops (#163683) 2025-10-29 15:41:45 +00:00
.clang-tidy Add clang-tidy misc-definitions-in-headers check (#164959) 2025-10-21 02:59:46 +00:00
accelerator.h Hide all APIs in torch::stable (#166077) 2025-10-25 00:18:26 +00:00
library.h Add scaffolding for StableIValue FC/BC (no PoC) (#164332) 2025-10-29 15:41:45 +00:00
ops.h Add scaffolding for aoti_torch_call_dispatcher BC with native ops (#163683) 2025-10-29 15:41:45 +00:00
stableivalue_conversions.h Add scaffolding for StableIValue FC/BC (no PoC) (#164332) 2025-10-29 15:41:45 +00:00
tensor_inl.h Hide all APIs in torch::stable (#166077) 2025-10-25 00:18:26 +00:00
tensor_struct.h Hide all APIs in torch::stable (#166077) 2025-10-25 00:18:26 +00:00
tensor.h Add ScalarType -> shim conversion, add stable::Tensor.scalar_type (#160557) 2025-08-19 22:13:47 +00:00
version.h Add TORCH_TARGET_VERSION for stable ABI (#164356) 2025-10-29 15:41:28 +00:00