Skip to content
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

Add --optimize argument #3093

Merged
merged 1 commit into from
May 10, 2021
Merged

Add --optimize argument #3093

merged 1 commit into from
May 10, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 10, 2021

Fix for c++ runtime errors in #2973

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvement in model export options with mobile optimization for TorchScript models.

πŸ“Š Key Changes

  • Added a new command line argument --optimize which enables optimization for TorchScript models targeted at mobile devices.
  • Modified the export logic to conditionally optimize TorchScript models using the new --optimize flag.
  • Removed an unnecessary comment in the Core ML export section.

🎯 Purpose & Impact

  • The new --optimize flag allows developers to export their models in a format better suited for mobile devices, potentially improving performance on such platforms.
  • Conditional optimization ensures developers have the choice to either create standard TorchScript models or opt for mobile-optimized versions based on their deployment needs.
  • By cleaning the codebase (removing the comment), the export script is simplified, making it easier to maintain and understand.

πŸ“± For users deploying YOLOv5 models to mobile devices, this change could result in more efficient models, with potentially faster inference times and a smoother user experience.

Fix for c++ runtime errors in #2973
@glenn-jocher glenn-jocher merged commit 525f4f8 into master May 10, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-5 branch May 10, 2021 10:13
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
Fix for c++ runtime errors in ultralytics#2973

(cherry picked from commit 525f4f8)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not run 'prepacked::conv2d_clamp_prepack' with arguments from the 'CUDA' backend.
1 participant