Skip to content

Conversation

@DenisVieriu97
Copy link
Collaborator

@DenisVieriu97 DenisVieriu97 commented Aug 6, 2024

Add support for serializing tensor weights > 4GB.

This change mirrors #1542 and #1543 for the MPS delegate, which enables serialization of constant weight data outside the flatbuffer blob.

Final raw bytes packed in the PT file have the following format:

| MPS Header     |
| Flatbuffer     |
| Constant data  |

cc @cccclai, @larryliu0820, @kimishpatel

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 6, 2024

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit 57f5845 with merge base 1b092e9 (image):

NEW FAILURES - The following jobs have failed:

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

@facebook-github-bot facebook-github-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 Aug 6, 2024
@kirklandsign kirklandsign requested a review from cccclai August 6, 2024 21:11
@DenisVieriu97 DenisVieriu97 force-pushed the dev/denis/fix_constant_fb_limit_mps branch from a77f9cf to f6a94d4 Compare August 6, 2024 21:43
Copy link
Contributor

@cccclai cccclai left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you for sending the change!

edit: trigger more tests as the end to end stories + llama is in the trunk job and we want to have it cover

@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@DenisVieriu97
Copy link
Collaborator Author

edit: trigger more tests as the end to end stories + llama is in the trunk job and we want to have it cover

Thanks @cccclai . Please let me know if I should be triggering these tests, or is this done automatically?

@cccclai
Copy link
Contributor

cccclai commented Aug 8, 2024

edit: trigger more tests as the end to end stories + llama is in the trunk job and we want to have it cover

Thanks @cccclai . Please let me know if I should be triggering these tests, or is this done automatically?

yeah I've triggered them, and looks clean.


import torch

from backends.apple.mps.serialization.mps_graph_schema import Buffer
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add this change? The test is failing internally...

Suggested change
from backends.apple.mps.serialization.mps_graph_schema import Buffer
from executorch.backends.apple.mps.serialization.mps_graph_schema import Buffer

Copy link
Contributor

Choose a reason for hiding this comment

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

@cccclai @DenisVieriu97 Do we know why it's not consistent? Make it fail on GitHub is better in this case

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not exactly sure, maybe related to how it's installed

@DenisVieriu97 DenisVieriu97 force-pushed the dev/denis/fix_constant_fb_limit_mps branch from f6a94d4 to a03dfb5 Compare August 9, 2024 00:25
@cccclai
Copy link
Contributor

cccclai commented Aug 9, 2024

@DenisVieriu97 DenisVieriu97 force-pushed the dev/denis/fix_constant_fb_limit_mps branch from c669217 to 57f5845 Compare August 9, 2024 17:24
@DenisVieriu97
Copy link
Collaborator Author

DenisVieriu97 commented Aug 9, 2024

Thanks! Still have a lint error...https://github.com/pytorch/executorch/actions/runs/10311496755/job/28545193000?pr=4574

Updated!

@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@larryliu0820 larryliu0820 requested a review from lucylq August 9, 2024 18:41
@facebook-github-bot facebook-github-bot merged commit c04bc99 into pytorch:main Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants