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

Fix the bug that tensorRT batch_size does not take effect #11672

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

wuhongsheng
Copy link
Contributor

@wuhongsheng wuhongsheng commented Jun 7, 2023

๐Ÿค– Generated by Copilot at 9f2b2a0

Summary

๐Ÿš€๐ŸŽ›๏ธ๐Ÿ”„

Added batch_size argument to export.run function in benchmarks.py to enable customizing the export batch size. This improves the export performance and flexibility of YOLOv5 models.

export.run changed
accepts batch_size argument
faster models in fall

Walkthrough

  • Add batch_size argument to export.run function and pass it from run function (link)

๐Ÿ› ๏ธ PR Summary

Made with โค๏ธ by Ultralytics Actions

๐ŸŒŸ Summary

Enhanced export functionality for different model formats in benchmark script.

๐Ÿ“Š Key Changes

  • Added batch_size parameter to the export.run function within the benchmarking script.

๐ŸŽฏ Purpose & Impact

  • ๐Ÿš€ Purpose: To allow the benchmarking script to handle exportation of models with configurable batch sizes, possibly optimizing the export process for various use cases.
  • ๐Ÿ“ˆ Impact: Users can now export their models for inference with different batch sizes, potentially improving model performance and resource usage during benchmarks.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘‹ Hello @wuhongsheng, thank you for submitting a YOLOv5 ๐Ÿš€ PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • โœ… Verify your PR is up-to-date with ultralytics/yolov5 master branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge master locally.
  • โœ… Verify all YOLOv5 Continuous Integration (CI) checks are passing.
  • โœ… Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." โ€” Bruce Lee

@glenn-jocher
Copy link
Member

@wuhongsheng looks good, thanks for the fix!

@glenn-jocher glenn-jocher merged commit a199480 into ultralytics:master Jun 7, 2023
NagatoYuki0943 added a commit to NagatoYuki0943/yolov5-ultralytics that referenced this pull request Jun 9, 2023
Fix the bug that tensorRT batch_size does not take effect (ultralytics#11672)
bandakopi pushed a commit to irajcode/yolov5 that referenced this pull request Jul 20, 2023
โ€ฆs#11672)

* Fix the bug that tensorRT batch_size does not take effect

Signed-off-by: wuhongsheng <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: wuhongsheng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 6, 2024
โ€ฆs#11672)

* Fix the bug that tensorRT batch_size does not take effect

Signed-off-by: wuhongsheng <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: wuhongsheng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

2 participants