Skip to content

Add Python APIs for PTD tensor dictionaries#21236

Open
Kilbex wants to merge 2 commits into
pytorch:mainfrom
Kilbex:python-ptd-tensor-dicts
Open

Add Python APIs for PTD tensor dictionaries#21236
Kilbex wants to merge 2 commits into
pytorch:mainfrom
Kilbex:python-ptd-tensor-dicts

Conversation

@Kilbex

@Kilbex Kilbex commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Adds public Python helpers for saving and loading PTD tensor dictionaries. The helpers validate PTD-compatible CPU tensors, preserve supported strides, normalize other layouts, and reject malformed tensor entries so callers no longer need to construct DataPayload objects directly.

Test plan

PYTHONPATH=.. python -m pytest extension/flat_tensor/test/test_serialize.py -q

lintrunner on the changed files

Authored with Claude.

@pytorch-bot

pytorch-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 3e30486 with merge base 430b73d (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 23, 2026
@Kilbex

Kilbex commented Jul 23, 2026

Copy link
Copy Markdown
Author

@pytorchbot label "release notes: api"

@pytorch-bot pytorch-bot Bot added the release notes: api Changes to public facing apis (any interfaces, pybinded runtime methods, etc.) label Jul 23, 2026
@nil-is-all nil-is-all added the module: extension Issues related to code under extension/ label Jul 23, 2026
@nil-is-all

Copy link
Copy Markdown
Contributor

Thanks for the PR, @Kilbex. Waiting on CI to finish running; will keep you posted

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. module: extension Issues related to code under extension/ release notes: api Changes to public facing apis (any interfaces, pybinded runtime methods, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants