Skip to content

Conversation

@zhxchen17
Copy link
Contributor

Summary:
Add a special field in Graph and Node level metadata called "custom" which should be mapped to a json-serializable object, and we guarantee this field should be always preversed across the following transformations:

  1. copy/deepcopy
  2. run_decompositions()
  3. serialization
  4. re-exporting

Test Plan: :test_export -- -r custom_tag

Reviewed By: angelayi

Differential Revision: D60291839

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 26, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 874879d with merge base 2fde193 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added ciflow/inductor release notes: fx release notes category labels Jul 26, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

@SherlockNoMad
Copy link
Contributor

This special field behavior should be documented somewhere...

Copy link
Contributor

@SherlockNoMad SherlockNoMad left a comment

Choose a reason for hiding this comment

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

lgtm with comment.

Do you plan to add the register_custom_field() API for nn.Module next?

@zhxchen17
Copy link
Contributor Author

Do you plan to add the register_custom_field() API for nn.Module next?

@SherlockNoMad no I don't plan to work on it in the near future.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

zhxchen17 added a commit to zhxchen17/pytorch that referenced this pull request Jul 29, 2024
Summary:
Pull Request resolved: pytorch#131912

Add a special field in Graph and Node level metadata called "custom" which should be mapped to a json-serializable object, and we guarantee this field should be always preversed across the following transformations:
1. copy/deepcopy
2. run_decompositions()
3. serialization
4. re-exporting

Test Plan: :test_export -- -r custom_tag

Reviewed By: angelayi

Differential Revision: D60291839
@zhxchen17 zhxchen17 requested a review from SherlockNoMad July 29, 2024 18:23
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

zhxchen17 added a commit to zhxchen17/pytorch that referenced this pull request Jul 30, 2024
Summary:
Pull Request resolved: pytorch#131912

Add a special field in Graph and Node level metadata called "custom" which should be mapped to a json-serializable object, and we guarantee this field should be always preversed across the following transformations:
1. copy/deepcopy
2. run_decompositions()
3. serialization
4. re-exporting

Test Plan: :test_export -- -r custom_tag

Reviewed By: angelayi

Differential Revision: D60291839
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

zhxchen17 added a commit to zhxchen17/pytorch that referenced this pull request Jul 30, 2024
Summary:
Pull Request resolved: pytorch#131912

Add a special field in Graph and Node level metadata called "custom" which should be mapped to a json-serializable object, and we guarantee this field should be always preversed across the following transformations:
1. copy/deepcopy
2. run_decompositions()
3. serialization
4. re-exporting

Test Plan: :test_export -- -r custom_tag

Reviewed By: angelayi

Differential Revision: D60291839
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60291839

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge -f 'Landed internally'

(Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

nmacchioni added a commit that referenced this pull request Aug 14, 2024
jerryzh168 added a commit that referenced this pull request Aug 20, 2024
Summary:
With #131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Aug 20, 2024
…eld"

Summary:
With #131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Aug 20, 2024
…eld"

Summary:
With #131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Aug 20, 2024
Summary:
With #131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: b6af5d0
Pull Request resolved: #134040
pytorchmergebot pushed a commit that referenced this pull request Aug 27, 2024
Summary:
With #131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:
Pull Request resolved: #134040
Approved by: https://github.com/tarun292
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Sep 20, 2024
…h#134040)

Summary:
With pytorch#131912 we now have a "custom" field in node.meta that can be preserved
in

* copy/deepcopy
* run_decompositions()
* serialization
* re-exporting

So we refactored numeric debugger to use this.

Test Plan:
python test/test_quantization.py TestNumericDebugger

Reviewers:

Subscribers:

Tasks:

Tags:
Pull Request resolved: pytorch#134040
Approved by: https://github.com/tarun292
facebook-github-bot pushed a commit that referenced this pull request Sep 23, 2024
Summary:
Improves and enables a commented out test originally introduced in #131912

In `test_custom_tag_metadata_re_export()`, we check the added "custom" metadata to given nodes is preserved and not copied to other nodes after re-exporting


Reviewed By: zhxchen17

Differential Revision: D62880574

Pulled By: yiming0416
pytorchmergebot pushed a commit that referenced this pull request Sep 23, 2024
Improves and enables a commented out test originally introduced in #131912

In `test_custom_tag_metadata_re_export()`, we check the added "custom" metadata to given nodes is preserved and not copied to other nodes after re-exporting
Pull Request resolved: #136048
Approved by: https://github.com/zhxchen17
BoyuanFeng pushed a commit to BoyuanFeng/pytorch that referenced this pull request Sep 25, 2024
Improves and enables a commented out test originally introduced in pytorch#131912

In `test_custom_tag_metadata_re_export()`, we check the added "custom" metadata to given nodes is preserved and not copied to other nodes after re-exporting
Pull Request resolved: pytorch#136048
Approved by: https://github.com/zhxchen17
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: fx release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants