-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make inductor config hashing more portable #127022
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/127022
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 aa5d81a with merge base b0871f9 ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D57748025 |
torch/_inductor/codecache.py
Outdated
@@ -656,11 +656,11 @@ def __init__( | |||
self.system_info = CacheBase.get_system() | |||
|
|||
try: | |||
self.inductor_config = config.save_config() | |||
self.inductor_config = config.save_config_for_cache() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Naming this "save_config_for_hash()" might be slightly more accurate? Just mentioning; I don't have a strong opinion.
torch/utils/_config_module.py
Outdated
@@ -156,6 +156,19 @@ def save_config(self) -> bytes: | |||
config.pop(key) | |||
return pickle.dumps(config, protocol=2) | |||
|
|||
def save_config_for_cache(self) -> bytes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It occurs to me that we could stick the whole dict into a field in the FxGraphDetails object rather than pickling it here and storing the serialized bytes in the details. The only advantage to doing that is the debug output we were inspecting today would show each field separately instead of just calling it "bytes"
Summary: masnesral and I noticed that config contains non portable artifacts. Lets fix that. Test Plan: adhoc testing Reviewed By: masnesral Differential Revision: D57748025
This pull request was exported from Phabricator. Differential Revision: D57748025 |
Summary: masnesral and I noticed that config contains non portable artifacts. Lets fix that. Test Plan: adhoc testing Reviewed By: masnesral Differential Revision: D57748025
92d2dff
to
3408f9b
Compare
This pull request was exported from Phabricator. Differential Revision: D57748025 |
This pull request was exported from Phabricator. Differential Revision: D57748025 |
Summary: masnesral and I noticed that config contains non portable artifacts. Lets fix that. Test Plan: adhoc testing Reviewed By: masnesral Differential Revision: D57748025
This pull request was exported from Phabricator. Differential Revision: D57748025 |
@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) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: masnesral and I noticed that config contains non portable artifacts. Lets fix that. Test Plan: adhoc testing Differential Revision: D57748025 Pull Request resolved: pytorch#127022 Approved by: https://github.com/masnesral
Summary: masnesral and I noticed that config contains non portable artifacts. Lets fix that.
Test Plan: adhoc testing
Differential Revision: D57748025
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang