-
Notifications
You must be signed in to change notification settings - Fork 17
program-data-separation demo #42
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
11059f6 to
bd2e5c2
Compare
bd2e5c2 to
588ae93
Compare
mergennachin
left a comment
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.
See inline
| const char *data_path = FLAGS_data_path.c_str(); | ||
|
|
||
| // Load the model. | ||
| Module module(model_path, data_path); |
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.
Nice!!
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.
do we have support for swift and java bindings?
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 added support for java bindings in the LLM runner. Outside of that, I don't think there is support yet.
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| #include <executorch/extension/module/module.h> |
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.
Do we need to update this doc?
https://docs.pytorch.org/executorch/main/extension-module.html
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.
Let me add these
| with open(pte_file, "wb") as fp: | ||
| executorch_program.write_to_file(fp) | ||
| if executorch_program._tensor_data.get("_default_external_constant"): | ||
| executorch_program._tensor_data[model_name] = ( | ||
| executorch_program._tensor_data.pop("_default_external_constant") | ||
| ) | ||
| executorch_program.write_tensor_data_to_file(args.outdir) |
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.
where are these AOT APIs document?
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.
should we update this doc too?
https://docs.pytorch.org/executorch/main/using-executorch-export.html
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.
Adding this too
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.
588ae93 to
76175cd
Compare
Add examples on how to generate PTE, PTD files, and how to run them in ExecuTorch via Module.
Note: I created a separate ET submodule --> we need the changes from 0.7 for this. However, I'm not sure we should be creating a new submodule for each project.
Issue: pytorch/executorch#12215