-
Notifications
You must be signed in to change notification settings - Fork 635
Fix compiled model export. #6568
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6568
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 289605a with merge base 461d61d ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -28,7 +28,7 @@ class BackendDelegate { | |||
// Max models cache size in bytes. | |||
size_t max_models_cache_size = 10 * size_t(1024) * size_t(1024) * size_t(1024); | |||
// If set to `true`, delegate pre-warms the most recently used asset. | |||
bool should_prewarm_asset = true; | |||
bool should_prewarm_asset = false; |
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.
Why do we need this change @cymbalrush?
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.
This feature was pre-warming the most recently used assets, which could impact the delegate initialization time and the first model load time. This optimization was beneficial only for the CPU backend and only when the subsequent asset load remained unchanged. So, disabling it by default.
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.
Thanks @cymbalrush, it's worth documenting the above behavior (on Line 30?)
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 create another PR for this.
@shoumikhin has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Exporting fails for a compiled model because it depends on
get_compiled_model_path
, which requires the model to be loaded. This pull request also introduces a test and disables asset prewarming by default, as it has some impact on the delegate initialization time.