Refactor NT offsets metadata to be a Tensor (#96909)

It's tedious work, but somebody's gotta do it.

Benefits:
* Enable access to offsets metadata from Python via private API (for validation, etc.)
* Consistency with nested sizes / strides metadata
* Needed for SymInt-ifying offsets metadata
* more TBD

Bonus:
* Remove `_tensor` suffixes from metadata / getter names
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96909
Approved by: https://github.com/drisspg
This commit is contained in:
Joel Schlosser
2023-03-21 04:20:22 -04:00
committed by PyTorch MergeBot
parent 22ea21da3d
commit 77e73b9b7a
30 changed files with 300 additions and 296 deletions

View File

@ -154,7 +154,6 @@ _SKIP_PYTHON_BINDINGS = [
"fill.Scalar", # only used by the functionalization pass
"lift.*",
"normal_functional", # only used by the functionalization pas
"_nested_tensor_offsets", # don't want to expose this to python
"_nested_view_from_buffer", # View only version of _nested_from_buffer. This will force users to only use the "safe" version.
"_nested_view_from_buffer_copy",
"_nested_view_from_buffer_copy_out",