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 OMP_NUM_THREADS=1 for macOS #8624

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Fix OMP_NUM_THREADS=1 for macOS #8624

merged 1 commit into from
Jul 18, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 18, 2022

Resolves #8623

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvement in thread management for macOS within the YOLOv5 codebase.

πŸ“Š Key Changes

  • Modified the environment variable setting for OMP_NUM_THREADS based on the operating system.
  • For macOS (darwin), this variable is hardcoded to '1', indicating a single thread.
  • For other operating systems, it continues to follow the NUM_THREADS setting.

🎯 Purpose & Impact

  • Enhances compatibility and stability of YOLOv5 on macOS by preventing multithreading issues specific to the platform.
  • Likely to improve the user experience on macOS by eliminating potential crashes or performance bottlenecks due to threading conflicts.
  • Users on other platforms should see no change in performance or behavior, maintaining the expected multithreading capabilities.

@glenn-jocher glenn-jocher self-assigned this Jul 18, 2022
@glenn-jocher glenn-jocher merged commit fbe67e4 into master Jul 18, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch July 18, 2022 15:53
@glenn-jocher glenn-jocher mentioned this pull request Jul 18, 2022
2 tasks
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 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.

Multi CPU on macOS is broken
1 participant