Skip to content

Add generic fx-graph serializer (NPTG) (#21032)#21032

Open
metascroy wants to merge 1 commit into
pytorch:mainfrom
metascroy:export-D111753288
Open

Add generic fx-graph serializer (NPTG) (#21032)#21032
metascroy wants to merge 1 commit into
pytorch:mainfrom
metascroy:export-D111753288

Conversation

@metascroy

@metascroy metascroy commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288

@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/21032

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

❌ 2 New Failures

As of commit 9d88fa6 with merge base b20f16a (image):

NEW FAILURES - The following jobs have failed:

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
@meta-codesync

meta-codesync Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@metascroy has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111753288.

@SS-JIA SS-JIA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@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.

@digantdesai digantdesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot changed the title Add generic fx-graph serializer (NFXG) Add generic fx-graph serializer (NFXG) (#21032) Jul 21, 2026
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 21, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from 065febf to f62ab23 Compare July 21, 2026 20:52
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 21, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from f62ab23 to ed45cb9 Compare July 21, 2026 22:20
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 25, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from ed45cb9 to e2e9061 Compare July 25, 2026 00:10
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 25, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from e2e9061 to 11a86cd Compare July 25, 2026 00:17
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 25, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from 11a86cd to 41a00d4 Compare July 25, 2026 06:55
metascroy added a commit to metascroy/executorch that referenced this pull request Jul 25, 2026
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@metascroy
metascroy force-pushed the export-D111753288 branch from 41a00d4 to 237ac69 Compare July 25, 2026 17:15
Summary:

Serialize a torch.fx graph to a standalone flatbuffer (native_graph.fbs, id
"NFXG") and back: a topological node list with a tagged Argument union, tensor
metadata side table, and by-reference constants (ConstantRef.fqn) whose bytes are
shipped separately. Covers input/output classification, symbolic dims in list
args, and a validate_graph() completeness check. Constants are never inlined.

Differential Revision: D111753288
@meta-codesync meta-codesync Bot changed the title Add generic fx-graph serializer (NFXG) (#21032) Add generic fx-graph serializer (NPTG) (#21032) Jul 25, 2026
@metascroy
metascroy force-pushed the export-D111753288 branch from 237ac69 to 9d88fa6 Compare July 25, 2026 22:24
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants