-
Notifications
You must be signed in to change notification settings - Fork 608
Introduce data schema to store raw tensors #6540
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6540
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (1 Unrelated Failure)As of commit 70c9f7f with merge base 3813f42 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
See: #6492 |
[ghstack-poisoned]
schema/data.fbs
Outdated
// Offset in scalar_type elements (e.g., multiples of 4 bytes for an int | ||
// scalar type) from the beginning of the tensor buffer to the beginning of | ||
// the actual data. Currently, the runtime only supports a value of zero. | ||
storage_offset:int; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
schema/data.fbs
Outdated
scalar_type:ScalarType; | ||
|
||
// Size of each dimension. | ||
dim_sizes:[int]; |
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.
equivalent of sizes
in program.fbs
, using dim_sizes
to differentiate from size
of the tensor below.
@lucylq has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
@lucylq has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D65156641 |
Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 251037652
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.
I was thinking maybe we should try to reuse more fields from the core schema but I guess the goal of this is different enough that we dont have to. Are we 100% sure we even need sizes and dim order. I think the set of fully qualified names provides a good enough compatibility guarantee (seems unlikely 2 models would have the exact same key set but different values)
exir/schema_data.py
Outdated
class TensorMetadata: | ||
fully_qualified_name: str | ||
scalar_type: ScalarType | ||
dim_sizes: List[int] |
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: just sizes not dim_sizes
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 253116779
This pull request was exported from Phabricator. Differential Revision: D65156641 |
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 253187679
This pull request was exported from Phabricator. Differential Revision: D65156641 |
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 253188153
This pull request was exported from Phabricator. Differential Revision: D65156641 |
Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641) [ghstack-poisoned]
Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 253910001
This pull request was exported from Phabricator. Differential Revision: D65156641 |
[executorch][serialization] Introduce data schema to store raw tensors Pull Request resolved: #6540 @imported-using-ghimport Differential Revision: [D65156641](https://our.internmc.facebook.com/intern/diff/D65156641/) ghstack-source-id: 253910001
Stack from ghstack (oldest at bottom):
Differential Revision: D65156641