-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Allow to byteswap data when reading saved torch jit data #151447
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
base: main
Are you sure you want to change the base?
Allow to byteswap data when reading saved torch jit data #151447
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151447
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9103fc8 with merge base ab65581 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Please do not embed large files into .py, just store them as artifacts (it looks like you are adding nearly 1500 lines to test_save_load.py)
Sure, I'll update tests. |
d67d162
to
f903ada
Compare
Tests are updated and build is fixed. Please take a look. |
@davidberard98 tagging you for torch.jit (sorry, not sure whether you're still the right person here) |
Could you please take a look at this PR again? |
This change is still relevant. |
9e564e7
to
9103fc8
Compare
This PR is still relevant. Could you please review it? |
Thank you very much for sending a PR. In this particular case, I'm afraid no one is working on TorchScript so I'm not sure if anyone will fix this. Maybe @SherlockNoMad if this API is still used on your end? |
The PR addresses an issue reported by a user. It is not adding any new functionality. Rather, it closes a gap for an otherwise well-supported platform. The code does not pose any risk to other platforms. The code is ready to be merged and includes test cases to ensure it continues to function properly. |
It looks like some pickled data is endian-dependent. Byteswap such data when needed.
Add testcases.
Fixes #151428
cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel