Skip to content

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

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

cymbalrush
Copy link
Contributor

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.

Copy link

pytorch-bot bot commented Oct 29, 2024

🔗 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 Failures

As of commit 289605a with merge base 461d61d (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 Oct 29, 2024
@@ -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;

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?

Copy link
Contributor Author

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.

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?)

Copy link
Contributor Author

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.

@facebook-github-bot
Copy link
Contributor

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

@shoumikhin shoumikhin merged commit b07be36 into pytorch:main Oct 30, 2024
43 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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